diff options
Diffstat (limited to 'system/hime')
-rw-r--r-- | system/hime/doinst.sh | 3 | ||||
-rw-r--r-- | system/hime/hime.SlackBuild | 78 | ||||
-rw-r--r-- | system/hime/hime.info | 2 |
3 files changed, 58 insertions, 25 deletions
diff --git a/system/hime/doinst.sh b/system/hime/doinst.sh new file mode 100644 index 000000000000..5fb28930db0b --- /dev/null +++ b/system/hime/doinst.sh @@ -0,0 +1,3 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/system/hime/hime.SlackBuild b/system/hime/hime.SlackBuild index 767ac9796037..b09b128b0f1c 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 diff --git a/system/hime/hime.info b/system/hime/hime.info index c72cbe33df21..f7ff3354723f 100644 --- a/system/hime/hime.info +++ b/system/hime/hime.info @@ -1,7 +1,7 @@ PRGNAM="hime" VERSION="0.9.10" HOMEPAGE="http://hime-ime.github.io/" -DOWNLOAD="https://github.com/hime-ime/hime/archive/v0.9.10.tar.gz" +DOWNLOAD="https://github.com/hime-ime/hime/archive/v0.9.10/hime-0.9.10.tar.gz" MD5SUM="132b9d764ca50e3affa41b8e0bc93720" DOWNLOAD_x86_64="" MD5SUM_x86_64="" |