Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
visdom
ocs-url
Commits
90c1b9c6
Commit
90c1b9c6
authored
Sep 11, 2018
by
akiraohgaki
Browse files
Merge branch 'develop'
parents
3a3e9d64
e7dbb6e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/package
View file @
90c1b9c6
...
...
@@ -11,17 +11,17 @@ PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)"
BUILDDIR
=
"
${
PROJDIR
}
/build_
${
PKGNAME
}
"
ubuntu_deb
()
{
# docker-image: ubuntu:14.04
install_build_deps_ubuntu_deb
add_pkguser
su
-c
"export HOME=/home/
${
PKGUSER
}
&& "
${
PKGSCRIPT
}
" build_ubuntu_deb"
${
PKGUSER
}
transfer_file
"
$(
find
"
${
BUILDDIR
}
"
-type
f
-name
"
${
PKGNAME
}
*.deb"
)
"
}
install_build_deps_ubuntu_deb
()
{
apt update
-qq
apt
-y
install
curl git
apt
-y
install
build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev
apt
-y
install
devscripts debhelper fakeroot
useradd
-m
${
PKGUSER
}
chown
-R
${
PKGUSER
}
"
${
PROJDIR
}
"
su
-c
"export HOME=/home/
${
PKGUSER
}
&& "
${
PKGSCRIPT
}
" build_ubuntu_deb"
${
PKGUSER
}
transfer_file
"
$(
find
"
${
BUILDDIR
}
"
-type
f
-name
"
${
PKGNAME
}
*.deb"
)
"
}
build_ubuntu_deb
()
{
...
...
@@ -35,16 +35,16 @@ build_ubuntu_deb() {
}
fedora_rpm
()
{
# docker-image: fedora:20
install_build_deps_fedora_rpm
add_pkguser
su
-c
"export HOME=/home/
${
PKGUSER
}
&& "
${
PKGSCRIPT
}
" build_fedora_rpm"
${
PKGUSER
}
transfer_file
"
$(
find
"
${
BUILDDIR
}
"
-type
f
-name
"
${
PKGNAME
}
*.rpm"
)
"
}
install_build_deps_fedora_rpm
()
{
yum
-y
install
curl git
yum
-y
install
make automake gcc gcc-c++ libtool qt5-qtbase-devel qt5-qtsvg-devel qt5-qtdeclarative-devel
yum
-y
install
rpm-build
useradd
-m
${
PKGUSER
}
chown
-R
${
PKGUSER
}
"
${
PROJDIR
}
"
su
-c
"export HOME=/home/
${
PKGUSER
}
&& "
${
PKGSCRIPT
}
" build_fedora_rpm"
${
PKGUSER
}
transfer_file
"
$(
find
"
${
BUILDDIR
}
"
-type
f
-name
"
${
PKGNAME
}
*.rpm"
)
"
}
build_fedora_rpm
()
{
...
...
@@ -58,17 +58,17 @@ build_fedora_rpm() {
}
opensuse_rpm
()
{
# docker-image: opensuse:42.1
install_build_deps_opensuse_rpm
add_pkguser
su
-c
"export HOME=/home/
${
PKGUSER
}
&& "
${
PKGSCRIPT
}
" build_opensuse_rpm"
${
PKGUSER
}
transfer_file
"
$(
find
"
${
BUILDDIR
}
"
-type
f
-name
"
${
PKGNAME
}
*.rpm"
)
"
}
install_build_deps_opensuse_rpm
()
{
zypper
--non-interactive
refresh
zypper
--non-interactive
install
curl git
zypper
--non-interactive
install
make automake gcc gcc-c++ libtool libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qtdeclarative-devel
zypper
--non-interactive
install
rpm-build
useradd
-m
${
PKGUSER
}
chown
-R
${
PKGUSER
}
"
${
PROJDIR
}
"
su
-c
"export HOME=/home/
${
PKGUSER
}
&& "
${
PKGSCRIPT
}
" build_opensuse_rpm"
${
PKGUSER
}
transfer_file
"
$(
find
"
${
BUILDDIR
}
"
-type
f
-name
"
${
PKGNAME
}
*.rpm"
)
"
}
build_opensuse_rpm
()
{
...
...
@@ -82,17 +82,17 @@ build_opensuse_rpm() {
}
archlinux_pkg
()
{
# docker-image: base/archlinux:latest
install_build_deps_archlinux_pkg
add_pkguser
su
-c
"export HOME=/home/
${
PKGUSER
}
&& "
${
PKGSCRIPT
}
" build_archlinux_pkg"
${
PKGUSER
}
transfer_file
"
$(
find
"
${
BUILDDIR
}
"
-type
f
-name
"
${
PKGNAME
}
*.pkg.tar.xz"
)
"
}
install_build_deps_archlinux_pkg
()
{
pacman
-Syu
--noconfirm
pacman
-S
--noconfirm
curl git
pacman
-S
--noconfirm
base-devel qt5-base qt5-svg qt5-declarative qt5-quickcontrols
pacman
-S
--noconfirm
pacman-contrib
useradd
-m
${
PKGUSER
}
chown
-R
${
PKGUSER
}
"
${
PROJDIR
}
"
su
-c
"export HOME=/home/
${
PKGUSER
}
&& "
${
PKGSCRIPT
}
" build_archlinux_pkg"
${
PKGUSER
}
transfer_file
"
$(
find
"
${
BUILDDIR
}
"
-type
f
-name
"
${
PKGNAME
}
*.pkg.tar.xz"
)
"
}
build_archlinux_pkg
()
{
...
...
@@ -105,6 +105,11 @@ build_archlinux_pkg() {
makepkg
-s
}
add_pkguser
()
{
useradd
-m
${
PKGUSER
}
chown
-R
${
PKGUSER
}
"
${
PROJDIR
}
"
}
export_srcarchive
()
{
if
[
"
${
1
}
"
]
;
then
$(
cd
"
${
PROJDIR
}
"
&&
git archive
--prefix
=
"
${
PKGNAME
}
/"
--output
=
"
${
1
}
"
HEAD
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment