--- admin/PlamoBuild-template-20180815 2018-08-15 16:18:50.000000000 +0900 +++ plamo/04_xapps/print.txz/libpaper/PlamoBuild.libpaper-1.1.24+nmu4 2018-11-08 18:12:24.000000000 +0900 @@ -1,19 +1,19 @@ #!/bin/sh ###################################################################### -url="" +url="http://ftp.debian.org/debian/pool/main/libp/libpaper/libpaper_1.1.24+nmu4.tar.gz" verify= digest= branch= commitid= -pkgbase= -vers= +pkgbase=libpaper +vers=1.1.24+nmu4 arch=`uname -m` build=P1 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README" +DOCS="AUTHORS INSTALL NEWS README COPYING ChangeLog" template=20180815 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -65,6 +65,66 @@ make install DESTDIR=$P fi done + cat <<- "EOF" > $P/usr/bin/run-parts + #!/bin/sh + # run-parts: Runs all the scripts found in a directory. + # from Slackware, by Patrick J. Volkerding with ideas borrowed + # from the Red Hat and Debian versions of this utility. + + # keep going when something fails + set +e + + if [ $# -lt 1 ]; then + echo "Usage: run-parts " + exit 1 + fi + + if [ ! -d $1 ]; then + echo "Not a directory: $1" + echo "Usage: run-parts " + exit 1 + fi + + # There are several types of files that we would like to + # ignore automatically, as they are likely to be backups + # of other scripts: + IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp" + + # Main loop: + for SCRIPT in $1/* ; do + # If this is not a regular file, skip it: + if [ ! -f $SCRIPT ]; then + continue + fi + # Determine if this file should be skipped by suffix: + SKIP=false + for SUFFIX in $IGNORE_SUFFIXES ; do + if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then + SKIP=true + break + fi + done + if [ "$SKIP" = "true" ]; then + continue + fi + # If we've made it this far, then run the script if it's executable: + if [ -x $SCRIPT ]; then + $SCRIPT || echo "$SCRIPT failed." + fi + done + + exit 0 + EOF + chmod 755 $P/usr/bin/run-parts + ( cd $B/debian/po ; for i in `ls *.po` ; do + install -d $P/usr/share/locale/${i%.po}/LC_MESSAGES + msgfmt $i -o $P/usr/share/locale/${i%.po}/LC_MESSAGES/$pkgbase.mo + done ) + install -d $P/etc/libpaper.d + cat <<- "EOF" > $P/etc/papersize + # Simply write the paper name. See papersize(5) for possible values + a4 + EOF touch $W/i.et cd $W TZ=UTC find $P ! -type l -newer i.st ! -newer i.et \ @@ -73,8 +133,17 @@ setup_docdir convert_links tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/$libdir | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/include | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/locale -name *.mo` + tar rvpf $pkg.tar -C $P etc/{libpaper.d,papersize} tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man1 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man3 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man5 | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/man/man8 | tail -n+2` tar rvpf $pkg.tar -C $P usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh TZ=UTC touch -t `date -u '+%m%d0000'` $pkg.tar xz $pkg.tar ; touch $pkg.tar.xz ; mv $pkg.tar.xz $pkg.txz cleanup