diff --git a/pkg/fedora/ocs-url.spec b/pkg/fedora/ocs-url.spec index 42cf10de8165dcb5d0960f2769b65bcf3fde792c..5369a32d876cbfd457797c2598942f7d41b7f21a 100644 --- a/pkg/fedora/ocs-url.spec +++ b/pkg/fedora/ocs-url.spec @@ -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). diff --git a/pkg/snap/snapcraft.yaml b/pkg/snap/snapcraft.yaml index fac30b8902d7e7218a8a2baad515b7f6d344077e..149514f98279ca9bf3aba8611cb837d8cfe0c175 100644 --- a/pkg/snap/snapcraft.yaml +++ b/pkg/snap/snapcraft.yaml @@ -19,11 +19,11 @@ parts: options: - PREFIX="/usr" build-packages: - - git - build-essential - qt5-default - libqt5svg5-dev - qtdeclarative5-dev + - git - snapcraft stage-packages: - libqt5svg5 diff --git a/pkg/ubuntu/debian/control b/pkg/ubuntu/debian/control index 52f4b84cf6f166599d37b6e0eacf6de067f5a556..de4998e9316c160bc054d60aada1852b01764828 100644 --- a/pkg/ubuntu/debian/control +++ b/pkg/ubuntu/debian/control @@ -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 diff --git a/scripts/build-docker.sh b/scripts/build-docker.sh index 2f207d7e2d06271252fb01ac55a9d7478c3dce78..bff025c08b3c74a69882ab93a805695d9af50a68 100644 --- a/scripts/build-docker.sh +++ b/scripts/build-docker.sh @@ -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 diff --git a/scripts/build.sh b/scripts/build.sh index 0da0d39dbcb2f35697174a874f14349b2d5bad95..a9969aa8a2a6326ad5e628428f3a3650fecd78d2 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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