IGNOREPATH=/etc:/home:/dev:/boot:/root:/tmp:/usr/local:/sbin:/mnt:/usr/src STRIPLIB=y STRIPBIN=y VERSION=4.0.2 PROGNAME="rpm $VERSION" DESC="\ rpm \n\ \n\ RPM is a tool from Red Hat Software used to install and remove \n\ packages in the .rpm format. When installing RPM packages on \n\ Slackware, you may need to use the --nodeps and --force options. \n\ Before installing any binary package, it's wise to examine it to \n\ see what it's going to do, and if it will overwrite any files. You \n\ can use rpm2tgz to convert .rpm packages to .tgz packages so you \n\ can look them over." BUILD=1 MAINTAINER="Mark Post " SOURCE=ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/ PKGNAME=rpm-$VERSION-s390-$BUILD TAG=OPT compile() { echo This package seems to have problems when either automake or autoconf are echo installed. This may get fixed in the future, but be prepared to removepkg them echo if problems still occur. The autoconf problem manifested itself as a gcc parse echo error in popt/config.h. #sleep 5 echo Ready? #sleep 2 echo Here we go! #sleep 1 tar -xvzf $CWD/rpm-$VERSION.tar.gz cd rpm-$VERSION/ if [ ! -d $TMP/saved ]; then mkdir $TMP/saved cp -a ABOUT-NLS CHANGES COPYING CREDITS GROUPS INSTALL README \ README.amiga RPM-GPG-KEY RPM-PGP-KEY TODO doc/manual $TMP/saved fi # Change the /usr/src/redhat path to /usr/src/rpm. This ain't redhat. find . -name "*.orig" | xargs rm --verbose for file in `find . -type f` do echo "Filtering /src/redhat path in $file..." cp -a $file $file.orig cat $file.orig | sed "/\/src\/redhat/s//\/src\/rpm/" > $file done for file in `find . -type f` do echo "Filtering {_usrsrc}/redhat path in $file..." cp -a $file $file.orig cat $file.orig | sed "/{_usrsrc}\/redhat/s//{_usrsrc}\/rpm/" > $file done find . -name "*.orig" | xargs rm --verbose ./configure --prefix=/usr s390-rpm-linux cat $CWD/makefile1.diff $CWD/makefile2.diff | patch -p0 # make CC=gcc-2.95.3 CFLAGS="-O2 -D_GNU_SOURCE -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts" # make CC=gcc-2.95.3 make CFLAGS="-O2 -D_GNU_SOURCE -Wall -Wpointer-arith \ -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts" } install() { make install DESTDIR=/package-rpm mkdir -p /package-rpm/usr/doc/rpm-$VERSION cp -a $TMP/saved/* /package-rpm/usr/doc/rpm-$VERSION ( cd /package-rpm/usr/man for suffix in 1 3 8 ;do for dir in `find . -type d -name man$suffix`; do (cd $dir rm -f *.gz gzip -9 *.$suffix 2> /dev/null ) done done ) ( cd /package-rpm/usr/lib/rpm rm -rf rpmpopt ; ln -sf rpmpopt-4.0.2 rpmpopt ) mkdir -p /package-rpm/var/lib/rpm/tmp/ zcat $CWD/Packages.gz > /package-rpm/var/lib/rpm/tmp/Packages # This gets rid of that annoying "Macro %optflags has empty body" message # by setting a -O compile option ( cd /package-rpm cat $CWD/macros.diff | patch -p0 ) rm -f /package-rpm/usr/include/popt.h \ /package-rpm/usr/man/man3/popt.3.gz \ /package-rpm/usr/lib/libpopt.* \ /package-rpm/usr/share/locale/*/LC_MESSAGES/popt.mo rmdir /package-rpm/var/tmp \ /package-rpm/usr/man/man3 } attributes() { chown -R root.bin $PKG/package-rpm/bin \ $PKG/package-rpm/usr/bin/ } special() { cd $PKG mv package-rpm/* ./ rmdir package-rpm cd $CTL cat $CWD/slack-desc > slack-desc cat <> doinst.sh if [ ! -r var/lib/rpm/Packages ]; then ( cd var/lib/rpm/tmp ; cp -a * .. ) fi ( cd var/lib/rpm && rm -f tmp/* && rmdir tmp ) EOF sed -e 's%package-rpm/%%g' doinst.sh > doinst.sh.new cat doinst.sh.new > doinst.sh rm doinst.sh.new }