aboutsummaryrefslogtreecommitdiff
path: root/system/hime/hime.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/hime/hime.SlackBuild')
-rw-r--r--system/hime/hime.SlackBuild78
1 files changed, 54 insertions, 24 deletions
diff --git a/system/hime/hime.SlackBuild b/system/hime/hime.SlackBuild
index 767ac97960378..b09b128b0f1ca 100644
--- a/system/hime/hime.SlackBuild
+++ b/system/hime/hime.SlackBuild
@@ -22,27 +22,33 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220211 bkw: Modified by SlackBuilds.org: BUILD=2
+# - fix 15.0 build.
+# - i486 => i586.
+# - add missing SLKCFLAGS stanza.
+# - use correct github download URL.
+# - thou shalt not write to $CWD!
+# - add missing docs (README, AUTHORS, etc).
+# - cat the SlackBuild to the doc dir.
+# - fix the icon in the .desktop file.
+# - add doinst.sh (update-desktop-database).
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=hime
VERSION=${VERSION:-0.9.10}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-SRCNAM="$(echo $PRGNAM | cut -d- -f2-)"
-
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -52,26 +58,36 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$VERSION
-
-if [ -e $CWD/v$VERSION.tar.gz ]; then
- mv $CWD/v$VERSION.tar.gz $CWD/$SRCNAM-$VERSION.tar.gz
-fi
-
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
-cd $SRCNAM-$VERSION
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
+SLKCFLAGS+=" -fcommon"
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -80,23 +96,37 @@ CXXFLAGS="$SLKCFLAGS" \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG -type f -a -print0 | \
+ xargs -0 file -m /etc/file/magic/elf | \
+ grep -e "executable" -e "shared object" | \
+ grep ELF | \
+ cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
-rm -rf $PKG/usr/share/doc
mv $PKG/usr/share/man $PKG/usr/man
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+gzip -9 $PKG/usr/man/man*/*
+rm -rf $PKG/usr/share/doc
+
+# 20220211 bkw: icon isn't in a theme in /usr/share/icons so it needs
+# the full path in the .desktop.
+sed -i '/^Icon=/s,=,=/usr/share/pixmaps/hime.png,' \
+ $PKG/usr/share/applications/hime-setup.desktop
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS ChangeLog README *.txt $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install $PKG/etc/profile.d
-cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/hime.sh > $PKG/etc/profile.d/hime.sh
cat $CWD/hime.csh > $PKG/etc/profile.d/hime.csh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE