diff --git a/Makefile.packaging b/Makefile.packaging index f17899669770e62b40960f96298b3458d823047e..e87a437887eb11371fbe9c7b0e2c5ff2fb78f46e 100644 --- a/Makefile.packaging +++ b/Makefile.packaging @@ -88,7 +88,8 @@ package-all: package-debian_8 \ package-fedora_23 \ package-fedora_23_i386 \ package-fedora_24 \ - package-fedora_24_i386 + package-fedora_24_i386 \ + package-gentoo # Append the output of make-packaging-target to this Makefile # see Makefile.packaging.distro_targets diff --git a/docker/Dockerfile_gentoo b/docker/Dockerfile_gentoo new file mode 100644 index 0000000000000000000000000000000000000000..c249e645960d20fec4bba6f868cf531469d10575 --- /dev/null +++ b/docker/Dockerfile_gentoo @@ -0,0 +1,18 @@ +FROM gentoo/stage3-amd64:latest + +RUN emerge-webrsync + +ADD scripts/gentoo/portage/ /etc/portage/ + +# profile with gnome and systemd configuration +RUN eselect profile set 5 && \ + emerge -uDN world + +RUN eselect news read + +RUN emerge layman && echo "source /var/lib/layman/make.conf" >> /etc/portage/make.conf + +ADD scripts/build-package-gentoo.sh /opt/build-package-gentoo.sh + +CMD /bin/bash /opt/build-package-gentoo.sh + diff --git a/scripts/build-package-gentoo.sh b/scripts/build-package-gentoo.sh new file mode 100644 index 0000000000000000000000000000000000000000..1c283b9bf8b174a2fcfcc23c0a81a267d87108e4 --- /dev/null +++ b/scripts/build-package-gentoo.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash +# +# Copyright (C) 2016 Savoir-faire Linux Inc. +# +# Author: Stefan Langenmaier <stefan.langenmaier@savoirfairelinux.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# +# This script is used in the packaging containers to build packages on +# rpm-based distros. +# + +set -e + +layman -f -a ring-overlay + +cp /opt/ring-project-ro/${RELEASE_TARBALL_FILENAME} /usr/portage/distfiles + +cd /var/lib/layman/ring-overlay && bash scripts/bump-ring-ebuilds.sh /usr/portage/distfiles/${RELEASE_TARBALL_FILENAME} + +# problem with cirrcular deps +USE="-qt5" emerge -1 dev-util/cmake + +emerge gnome-ring kde-ring + +touch /opt/output/.packages-built +chown -R ${CURRENT_UID}:${CURRENT_UID} /opt/output diff --git a/scripts/gentoo/portage/bashrc b/scripts/gentoo/portage/bashrc new file mode 100644 index 0000000000000000000000000000000000000000..14b80f021f3d0a8939daccbd61b241b666bfe314 --- /dev/null +++ b/scripts/gentoo/portage/bashrc @@ -0,0 +1,5 @@ +updatePkgs() { + chown -R ${CURRENT_UID}:${CURRENT_UID} /opt/output +} + +[[ $EBUILD_PHASE == "postinst" || $EBUILD_PHASE == "clean" ]] && updatePkgs diff --git a/scripts/gentoo/portage/make.conf b/scripts/gentoo/portage/make.conf new file mode 100644 index 0000000000000000000000000000000000000000..b6d4c3532c791eaf44a469d838f333371ee8c174 --- /dev/null +++ b/scripts/gentoo/portage/make.conf @@ -0,0 +1,17 @@ +# standard configuration to maximise portability +CFLAGS="-O2 -pipe" +CXXFLAGS="${CFLAGS}" +CHOST="x86_64-pc-linux-gnu" +USE="bindist -qt4 qt5" +CPU_FLAGS_X86="mmx mmxext sse sse2" +PORTDIR="/usr/portage" +DISTDIR="${PORTDIR}/distfiles" + +# modification to ouput built packages to a non standard folder +PKGDIR="/opt/output/packages" +FEATURES="$FEATURES buildpkg" +EMERGE_DEFAULT_OPTS="${EMERGE_DEFAULT_OPTS} --usepkg" + +# necessary for current layman version, should be removed with layman >2.0.0 +# cannot be specified from the beginning because layman is not yet installed +#source /var/lib/layman/make.conf diff --git a/scripts/gentoo/portage/package.env/ring b/scripts/gentoo/portage/package.env/ring new file mode 100644 index 0000000000000000000000000000000000000000..a42c214f070b1eb64a6df4d4cb0d7484ad1acf10 --- /dev/null +++ b/scripts/gentoo/portage/package.env/ring @@ -0,0 +1,18 @@ +# docker build +# not necessary when docker runs with PTRACE capability +dev-libs/gobject-introspection docker-build +app-text/poppler docker-build +dev-libs/crypto++ docker-build +dev-libs/libical docker-build +dev-libs/appstream-glib docker-build +net-libs/webkit-gtk docker-build +net-libs/gnome-online-accounts docker-build + +# build pkg +dev-libs/msgpack build-pkg +net-libs/libringclient build-pkg +net-libs/opendht build-pkg +net-voip/gnome-ring build-pkg +net-voip/kde-ring build-pkg +net-voip/ring-daemon build-pkg + diff --git a/scripts/gentoo/portage/package.keywords/ring b/scripts/gentoo/portage/package.keywords/ring new file mode 100644 index 0000000000000000000000000000000000000000..8c80d2a1f6f7764b3f6a6bcedb20ce82fa347df4 --- /dev/null +++ b/scripts/gentoo/portage/package.keywords/ring @@ -0,0 +1,16 @@ +# overlay +net-voip/gnome-ring ~amd64 +=net-voip/kde-ring-99999999 ** +net-libs/libringclient ~amd64 +net-voip/ring-daemon ~amd64 +dev-libs/msgpack ~amd64 +net-libs/opendht ~amd64 + +# deps +dev-libs/crypto++ ~amd64 +dev-libs/jsoncpp ~amd64 +net-libs/libupnp ~amd64 +media-libs/opus ~amd64 +media-libs/libvpx ~amd64 +dev-libs/dbus-c++ ~amd64 + diff --git a/scripts/gentoo/portage/package.use/ring b/scripts/gentoo/portage/package.use/ring new file mode 100644 index 0000000000000000000000000000000000000000..ecfef2d11ad0b20b054eea96db0a6b85ebdc47b4 --- /dev/null +++ b/scripts/gentoo/portage/package.use/ring @@ -0,0 +1,13 @@ +dev-libs/libpcre pcre16 + +sys-libs/zlib minizip +dev-libs/libdbusmenu-qt qt5 +media-libs/phonon-gstreamer qt5 +dev-qt/qtcore icu +media-libs/phonon-vlc qt5 +sys-auth/polkit-qt qt5 +media-libs/phonon qt5 + +# avoiding a cirrcular dep +media-libs/harfbuzz -graphite +dev-util/cmake -qt5 diff --git a/scripts/make-packaging-target.py b/scripts/make-packaging-target.py index a2c4ea29f555be830fb2359b17236c74f401c6d8..55cfe4fa1a0d144c8f607891828df1d470fe65a7 100755 --- a/scripts/make-packaging-target.py +++ b/scripts/make-packaging-target.py @@ -181,6 +181,12 @@ def run_generate_all(parsed_args): "debian_packaging_override": "", "output_file": ".packages-built", }, + # Gentoo + { + "distribution": "gentoo", + "debian_packaging_override": "", + "output_file": ".packages-built", + }, ]