diff options
Diffstat (limited to 'audio/jack-keyboard/jack-keyboard.SlackBuild')
-rw-r--r-- | audio/jack-keyboard/jack-keyboard.SlackBuild | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/audio/jack-keyboard/jack-keyboard.SlackBuild b/audio/jack-keyboard/jack-keyboard.SlackBuild index d7be65e2143e..7116c8010734 100644 --- a/audio/jack-keyboard/jack-keyboard.SlackBuild +++ b/audio/jack-keyboard/jack-keyboard.SlackBuild @@ -6,8 +6,17 @@ # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. +# 20170216 bkw: +# - Updated for v2.7.1. Apparently, upstream released 2.7.1 in 2012, but +# never got around to updating their web page, which still says that +# 2.5 is the latest release. It took me this long (5 years!) to notice +# there was a newer version on their sourceforge download page. Note +# that 2.5 used autotools but 2.7.1 uses cmake, so this script can no +# longer be used to build the old version. +# - Add capability stuff. + PRGNAM=jack-keyboard -VERSION=${VERSION:-2.5} +VERSION=${VERSION:-2.7.1} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -53,31 +62,40 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -./configure \ - --prefix=/usr \ - --libdir=/usr/lib${LIBDIRSUFFIX} \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --build=$ARCH-slackware-linux +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install DESTDIR=$PKG +cd .. make -make install-strip DESTDIR=$PKG +make install DESTDIR=$PKG +strip $PKG/usr/bin/$PRGNAM gzip -9 $PKG/usr/man/man1/$PRGNAM.1 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a \ - AUTHORS COPYING NEWS README TODO \ - $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh +# Only add capability stuff if not disabled: +if [ "${SETCAP:-yes}" = "yes" ]; then + cat $CWD/setcap.sh >> $PKG/install/doinst.sh + # Only allow execution by audio group + chown root:audio $PKG/usr/bin/$PRGNAM + chmod 0750 $PKG/usr/bin/$PRGNAM +fi + cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |