Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpc-factory
Manage
Activity
Members
Labels
Plan
Issues
76
Issue boards
Milestones
Wiki
Code
Merge requests
13
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
rc
hpc-factory
Commits
c934cf45
Commit
c934cf45
authored
2 years ago
by
Bo-Chun Chen
Browse files
Options
Downloads
Patches
Plain Diff
Add build zsh script
parent
a411714d
No related branches found
Branches containing commit
No related tags found
1 merge request
!10
Add gitlab ci into project
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ansible/files/build-zsh.sh
+44
-0
44 additions, 0 deletions
ansible/files/build-zsh.sh
with
44 additions
and
0 deletions
ansible/files/build-zsh.sh
0 → 100644
+
44
−
0
View file @
c934cf45
#!/bin/bash
name
=
zsh
version
=
5.9
mkdir
-p
BUILD RPMS SOURCES SPECS SRPMS
prereqs
=
"git epel-release bzip2 xz gzip tar"
rpm
-q
$prereqs
if
[
$?
-ne
0
]
;
then
sudo
yum
-y
install
$prereqs
;
fi
git clone https://src.fedoraproject.org/rpms/
${
name
}
.git
cp
${
name
}
/
${
name
}
.spec SPECS/
cp
${
name
}
/
*
.rhs SOURCES/
cp
${
name
}
/dot
*
SOURCES/
# Perl may not be available, switching to sed
#perl -pi -e 's/^(BuildRequires: glibc-langpack-ja)/#$1/g;' ${name}/${name}.spec
sed
-i
'/BuildRequires: glibc-langpack-ja/s/^/#/'
SPECS/
${
name
}
.spec
pkgs
=
"rpm-build
$(
grep
-E
'^BuildRequires|^Requires'
SPECS/
${
name
}
.spec |
awk
'{print $2}'
|
tr
'\n'
' '
)
"
;
echo
$pkgs
rpm
-q
$pkgs
if
[
$?
-ne
0
]
;
then
sudo
yum
install
-y
$pkgs
;
fi
if
[
!
-f
SOURCES/
${
name
}
-
${
version
}
.tar.xz
]
;
then
curl
-L
-o
SOURCES/
${
name
}
-
${
version
}
.tar.xz https://downloads.sourceforge.net/
${
name
}
/
${
name
}
-
${
version
}
.tar.xz
fi
if
[
!
-f
SOURCES/
${
name
}
-
${
version
}
.tar.xz.asc
]
;
then
curl
-L
-o
SOURCES/
${
name
}
-
${
version
}
.tar.xz.asc https://downloads.sourceforge.net/
${
name
}
/
${
name
}
-
${
version
}
.tar.xz.asc
fi
cd
SOURCES
sha512sum
-c
../
${
name
}
/sources
retval
=
$?
cd
-
if
[
$retval
-ne
0
]
;
then
# echo "SOURCES/${name}-${version}.tar.gz did not match checksum in ${name}/source"
exit
1
fi
rpmbuild
--define
"_topdir
`
pwd
`
"
-bb
SPECS/
${
name
}
.spec
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment