--- admin/PlamoBuild-template-20170713 2017-07-13 13:07:00.000000000 +0900 +++ plamo/01_minimum/gpm/PlamoBuild.gpm-1.20.7 2018-04-23 17:31:55.000000000 +0900 @@ -1,19 +1,22 @@ #!/bin/sh ###################################################################### -url="" +url="http://www.nico.schottelius.org/software/gpm/archives/gpm-1.20.7.tar.bz2" verify= digest= branch= commitid= -pkgbase= -vers= +pkgbase=gpm +vers=1.20.7 arch=`uname -m` -build=P1 +build=P6 src=$pkgbase-$vers patchfiles="" OPT_CONFIG="" -DOCS="README" +DOCS="COPYING MANIFEST README* TODO + doc/Announce doc/FAQ doc/HACK_GPM doc/README.* doc/changelog + doc/specs/synaptics/www.synaptics.com/decaf/utilities/* + doc/support/* doc/todo/*" template=20170713 tmplurl=ftp://plamo.linet.gr.jp/pub/Plamo-src/admin ###################################################################### @@ -37,12 +40,19 @@ if [ -d ${B[$i]} ] ; then rm -rf ${B[$i]} ; fi ; cp -a ${S[$i]} ${B[$i]} done apply_patches + cd $B + for i in display-{buttons,coords} get-versions ; do + cp -p src/prog/$i.c{,.orig} + sed -i 's@@"headers/gpm.h"@' src/prog/$i.c + done + ./autogen.sh for i in `seq 0 $((${#B[@]} - 1))` ; do cd ${B[$i]} if [ -x configure ] ; then ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --libdir='${exec_prefix}'/$libdir --infodir='${prefix}'/share/info \ - --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} + --mandir='${prefix}'/share/man ${OPT_CONFIG[$i]} \ + CFLAGS="-g -O2 -fPIC" fi done fi @@ -65,6 +75,74 @@ make install DESTDIR=$P fi done + install -m 644 conf/* $P/etc + install -d $P/etc/rc.d/init.d + cat <<- "EOF" > $P/etc/rc.d/init.d/gpm + #!/bin/sh + # Time-stamp: <2008-09-02 11:31:18 kojima> + + # This file is derived from avahi. + # Start/stop/restart daemon in init.d/XXXX + + DESC="gpm (General Purpose Mouse)" + NAME="gpm" + DAEMON1="/usr/sbin/gpm -m /dev/input/mice -t imps2" + DAEMON2="/usr/bin/gpm-root" + + status() { + if [ -n "`ps axww | gawk '{print $5}' | grep $NAME`" ] ; then + return 0 + else + return 1 + fi + } + + start() { + echo "Starting $DESC:" + $DAEMON1 & + $DAEMON2 & + } + + stop() { + echo "Stopping $DESC:" + killall gpm + killall gpm-root + } + + case "$1" in + start) + if status ; then + echo "$DESC is already running (will not start it twice)." + else + start + fi + ;; + stop) + if status ; then + stop + else + echo "$DESC seems already stopped." + fi + ;; + restart) + stop + start + ;; + status) + if status ; then + echo "$DESC is currently running." + else + echo "$DESC is not running." + fi + ;; + *) + echo "Usage: $0 {start|stop|status|restart}" + exit 1 + ;; + esac + exit 0 + EOF + chmod 755 $P/etc/rc.d/init.d/gpm touch $W/i.et cd $W find $P ! -type l -newer i.st ! -newer i.et \ @@ -72,9 +150,18 @@ compress setup_docdir convert_links - tar cvpf $pkg.tar -C $P `cd $P ; find usr/bin | tail -n+2` + tar cvpf $pkg.tar -C $P `cd $P ; find usr/sbin | tail -n+2` + tar rvpf $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 `cd $P ; find usr/include | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/emacs/site-lisp | tail -n+2` + tar rvpf $pkg.tar -C $P `cd $P ; find etc -type f` + tar rvpf $pkg.tar -C $P `cd $P ; find usr/share/info | tail -n+2` 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/man7 | 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 touch -t `date '+%m%d0900'` $pkg.tar ; xz $pkg.tar ; touch $pkg.tar.xz mv $pkg.tar.xz $pkg.txz cleanup