Skip to content
Snippets Groups Projects
Commit a5702563 authored by akiraohgaki's avatar akiraohgaki Committed by GitHub
Browse files

Merge pull request #51 from ocs-url/develop

Develop
parents 37da2c5c de767af4
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ URL: https://github.com/ocs-url/ocs-url
Source0: %{name}.tar.gz
Requires: qt5-qtbase >= 5.2.0, qt5-qtbase-gui >= 5.2.0, qt5-qtsvg >= 5.2.0, qt5-qtdeclarative >= 5.2.0, qt5-qtquickcontrols >= 5.2.0
BuildRequires: git, make, automake, gcc, gcc-c++, libtool, qt5-qtbase-devel >= 5.2.0, qt5-qtsvg-devel >= 5.2.0, qt5-qtdeclarative-devel >= 5.2.0, rpm-build
BuildRequires: make, automake, gcc, gcc-c++, libtool, qt5-qtbase-devel >= 5.2.0, qt5-qtsvg-devel >= 5.2.0, qt5-qtdeclarative-devel >= 5.2.0, git, rpm-build
%description
An install helper program for items served on OpenCollaborationServices (OCS).
......
......@@ -19,11 +19,11 @@ parts:
options:
- PREFIX="/usr"
build-packages:
- git
- build-essential
- qt5-default
- libqt5svg5-dev
- qtdeclarative5-dev
- git
- snapcraft
stage-packages:
- libqt5svg5
......
......@@ -2,7 +2,7 @@ Source: ocs-url
Section: web
Priority: optional
Maintainer: Akira Ohgaki <akiraohgaki@gmail.com>
Build-Depends: git, build-essential, qt5-default (>= 5.2.0), libqt5svg5-dev (>= 5.2.0), qtdeclarative5-dev (>= 5.2.0), devscripts, debhelper, fakeroot
Build-Depends: build-essential, qt5-default (>= 5.2.0), libqt5svg5-dev (>= 5.2.0), qtdeclarative5-dev (>= 5.2.0), git, devscripts, debhelper, fakeroot
Standards-Version: 3.9.4
Package: ocs-url
......
......@@ -4,6 +4,8 @@
# This is wrapper script for build.sh use from inside docker container
################################################################################
PKGNAME='ocs-url'
PKGUSER='pkgbuilder'
BUILDTYPE=''
......@@ -15,70 +17,88 @@ PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)"
BUILDSCRIPT="${PROJDIR}/scripts/build.sh"
transfer_file() {
filepath="${1}"
if [ -f "${filepath}" ]; then
filename="$(basename "${filepath}")"
echo "Uploading ${filename}"
curl -T "${filepath}" "https://transfer.sh/${filename}"
fi
}
build_ubuntu() {
# docker-image: ubuntu:14.04
apt update -qq
apt -y install git curl
apt -y install build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev
apt -y install devscripts debhelper fakeroot
apt -y install git devscripts debhelper fakeroot
apt -y install curl
useradd -m ${PKGUSER}
export HOME="/home/${PKGUSER}"
chown -R ${PKGUSER}:${PKGUSER} "${PROJDIR}"
su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER}
transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.deb")"
}
build_fedora() {
# docker-image: fedora:20
yum -y install git curl
yum -y install make automake gcc gcc-c++ libtool qt5-qtbase-devel qt5-qtsvg-devel qt5-qtdeclarative-devel
yum -y install rpm-build
yum -y install git rpm-build
yum -y install curl
# docker-image: fedora:22
#dnf -y install git curl
#dnf -y install make automake gcc gcc-c++ libtool qt5-qtbase-devel qt5-qtsvg-devel qt5-qtdeclarative-devel
#dnf -y install rpm-build
#dnf -y install git rpm-build
#dnf -y install curl
useradd -m ${PKGUSER}
export HOME="/home/${PKGUSER}"
chown -R ${PKGUSER}:${PKGUSER} "${PROJDIR}"
su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER}
transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.rpm")"
}
build_archlinux() {
# docker-image: base/archlinux:latest
pacman -Syu --noconfirm
pacman -S --noconfirm git curl
pacman -S --noconfirm base-devel qt5-base qt5-svg qt5-declarative qt5-quickcontrols
pacman -S --noconfirm git
pacman -S --noconfirm curl
useradd -m ${PKGUSER}
export HOME="/home/${PKGUSER}"
chown -R ${PKGUSER}:${PKGUSER} "${PROJDIR}"
su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER}
transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.pkg.tar.xz")"
}
build_snap() {
# docker-image: ubuntu:16.04
apt update -qq
apt -y install git curl
apt -y install build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev
apt -y install snapcraft
apt -y install git snapcraft
apt -y install curl
useradd -m ${PKGUSER}
export HOME="/home/${PKGUSER}"
chown -R ${PKGUSER}:${PKGUSER} "${PROJDIR}"
su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER}
transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.snap")"
}
build_appimage() {
# docker-image: ubuntu:14.04
apt update -qq
apt -y install git curl
apt -y install build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev
apt -y install fuse zsync desktop-file-utils
apt -y install git fuse zsync desktop-file-utils
apt -y install curl
modprobe fuse
......@@ -87,6 +107,8 @@ build_appimage() {
chown -R ${PKGUSER}:${PKGUSER} "${PROJDIR}"
su -c "sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER}
transfer_file "$(find "${PROJDIR}/build_*" -type f -name "${PKGNAME}*.AppImage")"
}
if [ "${BUILDTYPE}" = 'ubuntu' ]; then
......
......@@ -24,15 +24,6 @@ export_srcarchive() {
$(cd "${PROJDIR}" && git archive --prefix="${PKGNAME}/" --output="${filepath}" HEAD)
}
transfer_file() {
filepath="${1}"
if [ -f "${filepath}" ]; then
filename="$(basename "${filepath}")"
echo "Uploading ${filename}"
curl -T "${filepath}" "https://transfer.sh/${filename}"
fi
}
build_ubuntu() {
cd "${PROJDIR}"
mkdir -p "${BUILDDIR}"
......@@ -42,8 +33,6 @@ build_ubuntu() {
cp -r "${PROJDIR}/pkg/ubuntu/debian" "${BUILDDIR}/${PKGNAME}"
cd "${BUILDDIR}/${PKGNAME}"
debuild -uc -us -b
transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.deb")"
}
build_fedora() {
......@@ -56,8 +45,6 @@ build_fedora() {
mv "${SRCARCHIVE}" "${BUILDDIR}/SOURCES"
cp "${PROJDIR}/pkg/fedora/${PKGNAME}.spec" "${BUILDDIR}/SPECS"
rpmbuild --define "_topdir ${BUILDDIR}" -bb "${BUILDDIR}/SPECS/${PKGNAME}.spec"
transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.rpm")"
}
build_archlinux() {
......@@ -69,8 +56,6 @@ build_archlinux() {
cd "${BUILDDIR}"
updpkgsums
makepkg -s
transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.pkg.tar.xz")"
}
build_snap() {
......@@ -83,8 +68,6 @@ build_snap() {
cp -r "${PROJDIR}/pkg/snap/setup" "${BUILDDIR}/${PKGNAME}"
cd "${BUILDDIR}/${PKGNAME}"
snapcraft
transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.snap")"
}
build_appimage() {
......@@ -118,8 +101,6 @@ build_appimage() {
install -m 755 -p "${BUILDDIR}/${PKGNAME}/pkg/appimage/appimage-desktopintegration_${PKGNAME}" "${BUILDDIR}/${PKGNAME}.AppDir/AppRun"
./linuxdeployqt --appimage-extract
./squashfs-root/usr/bin/appimagetool "${BUILDDIR}/${PKGNAME}.AppDir"
transfer_file "$(find "${BUILDDIR}" -type f -name "${PKGNAME}*.AppImage")"
}
if [ "${BUILDTYPE}" = 'ubuntu' ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment