--- admin/PlamoBuild-template-20170415 2017-04-15 12:25:32.000000000 +0900 +++ plamo/05_ext/AV.txz/gsm/PlamoBuild.gsm-1.0_pl13 2017-05-13 12:57:01.000000000 +0900 @@ -1,16 +1,17 @@ #!/bin/sh ###################################################################### -url="" +url="http://archive.ubuntu.com/ubuntu/pool/main/libg/libgsm/libgsm_1.0.13.orig.tar.gz + http://archive.ubuntu.com/ubuntu/pool/main/libg/libgsm/libgsm_1.0.13-3.diff.gz" verify= digest= commitid= -pkgbase= -vers= +pkgbase=gsm +vers=1.0_pl13 arch=`uname -m` -build=P1 -src=$pkgbase-$vers -patchfiles="" +build=P2 +src=$pkgbase-1.0-pl13 +patchfiles="libgsm_1.0.13-3.diff.gz" OPT_CONFIG="" DOCS="README" template=20170415 @@ -36,6 +37,27 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches + cd $B + for i in debian/patches/*.dpatch ; do patch -Np1 -i $i ; done + cp -p Makefile{,.orig} + cat <<- "EOF" | patch Makefile + 47c47 + < CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1 + --- + > CCFLAGS = -c -O2 -fPIC -DNeedFunctionPrototypes=1 + 82,84c82,84 + < GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib + < GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc + < GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3 + --- + > GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/$(LIBDIR) + > GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/include/gsm + > GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/share/man/man3 + 94c94 + < TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1 + --- + > TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/share/man/man1 + EOF for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then @@ -61,9 +83,13 @@ for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -f Makefile ] ; then - make install DESTDIR=$P + install -d $P/usr/{bin,$libdir,include/gsm,share/man/man{1,3}} + make -i install INSTALL_ROOT=$P/usr LIBDIR=$libdir fi done + install lib/libgsm.so.1.0.12 $P/usr/$libdir + ln -s libgsm.so.1.0.12 $P/usr/$libdir/libgsm.so.1 + ln -s libgsm.so.1.0.12 $P/usr/$libdir/libgsm.so touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -72,8 +98,12 @@ 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/$libdir | tail -n+2` + tar rvpf $pkg.tar -C $P usr/include/gsm 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 usr/share/doc/$src + tar rvpf $pkg.tar -C $P install/doinst.sh touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz cleanup