diff options
-rw-r--r-- | system/freeipmi/doinst.sh | 7 | ||||
-rw-r--r-- | system/freeipmi/freeipmi.SlackBuild | 46 |
2 files changed, 29 insertions, 24 deletions
diff --git a/system/freeipmi/doinst.sh b/system/freeipmi/doinst.sh index fe318696f2..fa0ce22fef 100644 --- a/system/freeipmi/doinst.sh +++ b/system/freeipmi/doinst.sh @@ -13,10 +13,3 @@ config() { fi # Otherwise, we leave the .new copy for the admin to consider... } - -# doinst.sh reads the list of files from ./install/conffiles at install time. -# ./install/conffiles was generated at build time/ -for cf in $(cat install/conffiles) -do - config $cf.new -done diff --git a/system/freeipmi/freeipmi.SlackBuild b/system/freeipmi/freeipmi.SlackBuild index 4ee946e2ec..6e4cfe9ea0 100644 --- a/system/freeipmi/freeipmi.SlackBuild +++ b/system/freeipmi/freeipmi.SlackBuild @@ -24,11 +24,19 @@ # 2019-03-30: Initial Release # +# 20220411 bkw: Modified by SlackBuilds.org, BUILD=3: +# - don't try to use $PKG/install/conffiles as a list of .new +# config files: it doesn't work, and results in a /installpkg-blah +# file being left on the filesystem when the package is installed. +# - relative symlinks in /usr/sbin. +# - no useless INSTALL in doc dir. +# - remove static library. + cd $(dirname $0) ; CWD=$(pwd) PRGNAM=freeipmi VERSION=${VERSION:-1.6.3} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -40,9 +48,6 @@ if [ -z "$ARCH" ]; then 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 @@ -77,9 +82,9 @@ 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 {} \+ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ @@ -90,19 +95,14 @@ CXXFLAGS="$SLKCFLAGS" \ --localstatedir=/var \ --mandir=/usr/man \ --docdir=/usr/doc/$PRGNAM-$VERSION \ + --disable-static \ --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 +make install-strip DESTDIR=$PKG +gzip -9 $PKG/usr/man/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 - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cd $TMP/$PRGNAM-$VERSION +rm -f $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild rm -f $PKG/usr/lib*/*.la @@ -125,11 +125,23 @@ done rmdir etc/init.d +# 20220411 bkw: absolute symlinks are annoying, make relative. +cd usr/sbin +ln -sf ipmiconsole ipmi-console +ln -sf ipmidetect ipmi-detect +ln -sf ipmiping ipmi-ping +ln -sf ipmipower ipmi-power +ln -sf ipmi-pef-config pef-config +ln -sf rmcpping rmcp-ping +cd - + # Don't clobber existing config files. +# 20220411 bkw: just append the 'config' commands directly to the doinst, +# the old install/conffiles approach didn't actually work anyway. for i in $(find etc -type f) do mv $i $i.new - echo $i -done 1>>$PKG/install/conffiles + echo "config $i.new" +done 1>>$PKG/install/doinst.sh /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |