wok-next view gmtk/receipt @ rev 21017
Some maintenance
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue Oct 16 16:46:05 2018 +0300 (2018-10-16) |
parents | d2950281f122 |
children | d5aab818505e |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="gmtk"
4 VERSION="1.0.9"
5 CATEGORY="libs"
6 SHORT_DESC="GNOME MPlayer Toolkit"
7 MAINTAINER="al.bobylev@gmail.com"
8 LICENSE="GPL2"
9 WEB_SITE="https://sites.google.com/site/kdekorte2/gmtk"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="https://github.com/kdekorte/gmtk/archive/v$VERSION.tar.gz"
14 BUILD_DEPENDS="gettext intltool xorg-libX11-dev gtk3-dev gtk2-dev glib-dev \
15 gconf-dev alsa-lib-dev pulseaudio-dev"
16 SPLIT="gmlib gmtk gmtk3 gmtk-dev"
18 compile_rules() {
19 # The goal of this tricky receipt is to provide different GTK2 and GTK3
20 # libraries that can be installed at the same time not overwriting each
21 # other.
22 # Note, it is not enough to rename just *.so library file and symlinks,
23 # take care about SONAME field inside the library.
25 # GTK+2 #
27 ./configure \
28 --disable-static \
29 --disable-gtk3 \
30 $CONFIGURE_ARGS &&
31 fix libtool &&
32 make &&
33 make install || return 1
35 # stash gmtk.pc
36 mv $install/usr/lib/pkgconfig/gmtk.pc $install/usr/lib/pkgconfig/gmtk.pc.save
38 # GTK+3 #
40 # libgmtk.so* -> libgmtk3.so*
41 sed -i "/^libname_spec='/s|name'$|{name}3'|" configure
42 make clean
43 ./configure \
44 --disable-static \
45 --enable-gtk3 \
46 $CONFIGURE_ARGS &&
47 fix libtool &&
48 make &&
49 make install || return 1
51 rm $install/usr/lib/libgmlib3.so* # the same as libgmlib.so*
53 # make gmtk3.pc
54 mv $install/usr/lib/pkgconfig/gmtk.pc $install/usr/lib/pkgconfig/gmtk3.pc
55 sed -i 's|lgmtk|lgmtk3|' $install/usr/lib/pkgconfig/gmtk3.pc
56 # revert gmtk.pc
57 mv $install/usr/lib/pkgconfig/gmtk.pc.save $install/usr/lib/pkgconfig/gmtk.pc
59 # CHECK #
61 for i in libgmtk libgmtk3; do
62 echo $i:
63 readelf -a $install/usr/lib/$i.so.$VERSION | fgrep '(SONAME)'
64 done
65 }
67 genpkg_rules() {
68 case $PACKAGE in
69 gmlib)
70 copy libgmlib.so*
71 DEPENDS="alsa-lib glib pulseaudio pulseaudio-glib"
72 CAT="libs|common library"
73 ;;
74 gmtk)
75 copy libgmtk.so*
76 DEPENDS="alsa-lib cairo glib gmlib gtk2 pulseaudio pulseaudio-glib"
77 CAT="libs|GTK2 libs"
78 ;;
79 gmtk3)
80 copy libgmtk3.so*
81 DEPENDS="alsa-lib cairo glib gmlib gtk3 pulseaudio pulseaudio-glib"
82 CAT="libs|GTK3 libs"
83 ;;
84 gmtk-dev)
85 copy @dev
86 ;;
87 esac
88 }