jeex.SlackBuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. #!/bin/bash
  2. # Slackware build script for jeex
  3. # Originally by Luis Henrique <email removed>
  4. # Modified by Ryan P.C. McQuen | Everett, WA | <email removed>
  5. # Now maintained by B. Watson (yalhcru@gmail.com)
  6. # Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
  7. # 20210902 bkw:
  8. # - BUILD=4
  9. # - fix build on -current/15
  10. # - relicensed as WTFPL, with permission from Ryan. The original author,
  11. # Luis, never included a license at all.
  12. # - Put .desktop file in the right place and fix its icon reference.
  13. # 20170309 bkw:
  14. # - take over maintenance
  15. # - build was failing due to autoconf brain damage, fix
  16. # - i486 => i586
  17. # - old homepage MIA, use github
  18. # - use github download. contents of tarball are identical, but
  19. # the top-level dir name now matches $VERSION
  20. # - fix bad permissions (docs, desktop, and /etc/jeex.rc.new were +x)
  21. # - BUILD=3
  22. cd $(dirname $0) ; CWD=$(pwd)
  23. PRGNAM=jeex
  24. VERSION=${VERSION:-12.6.1}
  25. BUILD=${BUILD:-4}
  26. TAG=${TAG:-_SBo}
  27. PKGTYPE=${PKGTYPE:-tgz}
  28. if [ -z "$ARCH" ]; then
  29. case "$( uname -m )" in
  30. i?86) ARCH=i586 ;;
  31. arm*) ARCH=arm ;;
  32. *) ARCH=$( uname -m ) ;;
  33. esac
  34. fi
  35. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  36. echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  37. exit 0
  38. fi
  39. TMP=${TMP:-/tmp/SBo}
  40. PKG=$TMP/package-$PRGNAM
  41. OUTPUT=${OUTPUT:-/tmp}
  42. if [ "$ARCH" = "i586" ]; then
  43. SLKCFLAGS="-O2 -march=i586 -mtune=i686"
  44. LIBDIRSUFFIX=""
  45. elif [ "$ARCH" = "i686" ]; then
  46. SLKCFLAGS="-O2 -march=i686 -mtune=i686"
  47. LIBDIRSUFFIX=""
  48. elif [ "$ARCH" = "x86_64" ]; then
  49. SLKCFLAGS="-O2 -fPIC"
  50. LIBDIRSUFFIX="64"
  51. else
  52. SLKCFLAGS="-O2"
  53. LIBDIRSUFFIX=""
  54. fi
  55. set -e
  56. rm -rf $PKG
  57. mkdir -p $TMP $PKG $OUTPUT
  58. cd $TMP
  59. rm -rf $PRGNAM-$VERSION
  60. tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
  61. cd $PRGNAM-$VERSION
  62. chown -R root:root .
  63. # upstream's permissions are horrid, don't use standard template here.
  64. find . -type f -a -exec chmod 644 {} +
  65. find . -type d -a -exec chmod 755 {} +
  66. # stoopid autoconf requires NEWS and AUTHORS. yeah, you can require them,
  67. # but you can't force people to actually write documentation in them.
  68. touch NEWS AUTHORS
  69. rm -f configure
  70. autoreconf -if
  71. # 20210902 bkw: need for 15.0
  72. SLKCFLAGS+=" -fcommon"
  73. CFLAGS="$SLKCFLAGS" \
  74. CXXFLAGS="$SLKCFLAGS" \
  75. ./configure \
  76. --prefix=/usr \
  77. --libdir=/usr/lib${LIBDIRSUFFIX} \
  78. --sysconfdir=/etc \
  79. --localstatedir=/var \
  80. --mandir=/usr/man \
  81. --docdir=/usr/doc/$PRGNAM-$VERSION \
  82. --build=$ARCH-slackware-linux
  83. make
  84. make install-strip DESTDIR=$PKG
  85. mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
  86. cp -a ChangeLog COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
  87. cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
  88. # 20210902 bkw: .desktop was being installed in wrong place, and needs
  89. # the icon fixed anyway.
  90. rm -rf $PKG/usr/share/jeex/applications
  91. mkdir -p $PKG/usr/share/applications
  92. sed '/^Icon/s,jeex,/usr/share/jeex/icons/jeex.png,' \
  93. < jeex.desktop \
  94. > $PKG/usr/share/applications/jeex.desktop
  95. # 20210902 bkw: don't need 2 actual copies of the icon.
  96. rm -f $PKG/usr/share/jeex/images/jeex.png
  97. ln -s ../icons/jeex.png $PKG/usr/share/jeex/images/jeex.png
  98. mv $PKG/etc/jeex.rc $PKG/etc/jeex.rc.new
  99. mkdir -p $PKG/install
  100. cat $CWD/slack-desc > $PKG/install/slack-desc
  101. cat $CWD/doinst.sh > $PKG/install/doinst.sh
  102. cd $PKG
  103. /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE