[waffle] [PATCH 2/8] pkg/archlinux: Update to a dual (+multilib) package
Emil Velikov
emil.l.velikov at gmail.com
Sat May 24 15:56:48 PDT 2014
On 24/05/14 23:51, Emil Velikov wrote:
> Include both 64bit and multilib binaries when building
> on x86-64 platform. This saves us deeping track of version
> numbers and interdependencies in case of a split package.
>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
> pkg/archlinux/waffle-1.3.0/PKGBUILD | 84 +++++++++++++++++++++++++++++++------
> 1 file changed, 72 insertions(+), 12 deletions(-)
>
> diff --git a/pkg/archlinux/waffle-1.3.0/PKGBUILD b/pkg/archlinux/waffle-1.3.0/PKGBUILD
> index 569b466..0221a84 100644
> --- a/pkg/archlinux/waffle-1.3.0/PKGBUILD
> +++ b/pkg/archlinux/waffle-1.3.0/PKGBUILD
> @@ -9,12 +9,12 @@ url='http://waffle-gl.github.io'
> license=('BSD')
>
As it always happens - you realise that you've forgotten something as soon as
the email is on it's way :)
The commit should be bumping pkgrel.
-Emil
> depends=(
> - 'libgl' # for GLX
> - 'libegl'
> - 'libgbm'
> - 'libx11'
> - 'libxcb'
> - 'wayland'
> + 'libgl' 'lib32-libgl' # for GLX
> + 'libegl' 'lib32-libegl'
> + 'libgbm' 'lib32-libgbm'
> + 'libx11' 'lib32-libx11'
> + 'libxcb' 'lib32-libxcb'
> + 'wayland' 'lib32-wayland'
> )
> makedepends=(
> 'cmake'
> @@ -24,29 +24,89 @@ makedepends=(
> 'libxslt'
> 'docbook-xsl'
> )
> +
> +if [[ $CARCH == i686 ]]; then
> + # Strip lib32 etc. on i686
> + depends=(${depends[@]/*lib32-*/})
> +else
> + provides=("lib32-$pkgname" "lib32-$pkgname=$pkgver")
> +fi
> +
> source=("https://github.com/waffle-gl/waffle/releases/download/$pkgname-$pkgver/$pkgname-$pkgver.tar.xz")
> sha256sums=('340ee04172dba878249469018cd7ec9d1ecd41af26b612c741b8b52e713bca8e')
>
> build() {
> - cd "$srcdir/$pkgname-$pkgver"
> + cd "$srcdir"
> +
> + rm -rf $pkgname-{32,64}-build
> +
> + waffle32_libdir=/usr/lib
> + waffle32_manpages=1
> + waffle32_htmldocs=1
> +
> + if [[ $CARCH == x86_64 ]]; then
> + msg2 "Building (x86_64) waffle..."
> +
> + mkdir $pkgname-64-build
> + cd "$srcdir/$pkgname-64-build"
> +
> + cmake ../$pkgname-$pkgver \
> + -DCMAKE_INSTALL_PREFIX=/usr \
> + -DCMAKE_INSTALL_LIBDIR=/usr/lib \
> + -DCMAKE_BUILD_TYPE=Release \
> + -Dwaffle_has_gbm=1 \
> + -Dwaffle_has_glx=1 \
> + -Dwaffle_has_x11_egl=1 \
> + -Dwaffle_has_wayland=1 \
> + -Dwaffle_build_manpages=1 \
> + -Dwaffle_build_htmldocs=1 \
> + -Dwaffle_build_examples=0
> +
> + make
>
> - cmake \
> + cd ..
> + waffle32_libdir=/usr/lib32
> + waffle32_manpages=0
> + waffle32_htmldocs=0
> +
> + export CC='gcc -m32'
> + export CXX='g++ -m32'
> + export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
> + fi
> +
> + mkdir $pkgname-32-build
> + msg2 "Building (i686) waffle..."
> + cd "$srcdir/$pkgname-32-build"
> +
> + cmake ../$pkgname-$pkgver \
> -DCMAKE_INSTALL_PREFIX=/usr \
> - -DCMAKE_INSTALL_LIBDIR=/usr/lib \
> + -DCMAKE_INSTALL_LIBDIR=$waffle32_libdir \
> -DCMAKE_BUILD_TYPE=Release \
> -Dwaffle_has_gbm=1 \
> -Dwaffle_has_glx=1 \
> -Dwaffle_has_x11_egl=1 \
> -Dwaffle_has_wayland=1 \
> - -Dwaffle_build_manpages=1 \
> - -Dwaffle_build_htmldocs=1 \
> + -Dwaffle_build_manpages=$waffle32_manpages \
> + -Dwaffle_build_htmldocs=$waffle32_htmldocs \
> -Dwaffle_build_examples=0
> make
> }
>
> package() {
> cd "$srcdir/$pkgname-$pkgver"
> - make DESTDIR="$pkgdir/" install
> +
> + if [[ $CARCH == x86_64 ]]; then
> + msg2 "Packaging (x86_64) waffle..."
> + cd "$srcdir/$pkgname-64-build"
> +
> + make DESTDIR="$pkgdir" install
> + fi
> +
> + msg2 "Packaging (i686) waffle..."
> + cd "$srcdir/$pkgname-32-build"
> +
> + make DESTDIR="$pkgdir" install
> +
> install -m755 -d "$pkgdir/usr/share/licenses/$pkgname"
> install -m644 "$pkgdir/usr/share/doc/waffle1/LICENSE.txt" \
> "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
>
More information about the waffle
mailing list