OSSP CVS Repository

ossp - Check-in [1781]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 1781
Date: 2002-Feb-01 15:58:04 (local)
2002-Feb-01 14:58:04 (UTC)
User:rse
Branch:
Comment: switch to devtool environment
Tickets:
Inspections:
Files:
ossp-pkg/shtool/.configure      added-> 1.3
ossp-pkg/shtool/.cvsignore      added-> 1.4
ossp-pkg/shtool/Makefile.in      1.45 -> 1.46     0 inserted, 47 deleted
ossp-pkg/shtool/devtool      added-> 1.1
ossp-pkg/shtool/devtool.conf      added-> 1.1
ossp-pkg/shtool/devtool.func      added-> 1.1

ossp-pkg/shtool/.configure -> 1.3

*** /dev/null    Sat Nov 23 01:26:14 2024
--- -    Sat Nov 23 01:26:17 2024
***************
*** 0 ****
--- 1,2 ----
+ #!/bin/sh
+ ./configure --prefix=/sw/pkg/shtool "$@"


ossp-pkg/shtool/.cvsignore -> 1.4

*** /dev/null    Sat Nov 23 01:26:14 2024
--- -    Sat Nov 23 01:26:17 2024
***************
*** 0 ****
--- 1,9 ----
+ Makefile
+ config.cache
+ config.log
+ config.status
+ configure
+ shtool
+ shtool.1
+ shtoolize
+ shtoolize.1


ossp-pkg/shtool/Makefile.in 1.45 -> 1.46

--- Makefile.in  2001/12/31 15:06:04     1.45
+++ Makefile.in  2002/02/01 14:58:04     1.46
@@ -40,9 +40,6 @@
 CP          = cp
 LS          = ls
 
-USER_NAME   = gnu
-GROUP_NAME  = shtool
-
 SCRIPTS = \
  sh.echo \
  sh.mdate \
@@ -134,47 +131,3 @@
         $(RM) Makefile shtoolize
         $(RM) config.cache config.status config.log
 
-#   (not intended to be run by end users)
-dist: distclean
-        $(SHELL) sh.fixperm -v *; \
-        V=`$(SHELL) sh.version -l txt -d short VERSION`; \
-        $(SHELL) sh.tarball -o shtool-$${V}.tar.gz -d shtool-$${V} \
-                            -u $(USER_NAME) -g $(GROUP_NAME) \
-                            -e 'CVS,\.cvsignore,\.[ao]$$,^\.' \
-                            -c 'gzip --best' .; \
-        $(LS) -l shtool-$$V.tar.gz
-
-#   (not intended to be run by end users)
-snap: distclean
-        @$(SHELL) sh.fixperm -v *; \
-        V=`$(SHELL) sh.version -l txt -d short VERSION`; \
-        $(SHELL) sh.tarball -o shtool-$${V}-SNAP.tar.gz -d shtool-$${V}-SNAP \
-                            -u $(USER_NAME) -g $(GROUP_NAME) \
-                            -e 'CVS,\.cvsignore,\.[ao]$$,^\.' \
-                            -c 'gzip --best' .; \
-        $(LS) -l shtool-$$V-SNAP.tar.gz
-
-#   (not intended to be run by end users)
-new-version:
-        @echo "Setting new version information:"; \
-        V="$(VERSION)"; \
-        if [ ".$$V" != . ]; then \
-                OPT="-s$$V"; \
-        else \
-                OPT="-e"; \
-        fi; \
-        $(SHELL) ./sh.version -l txt -n "GNU shtool" -p shtool $$OPT VERSION; \
-        V=`$(SHELL) ./sh.version -l txt -d long VERSION`; \
-        sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README; \
-        V=`$(SHELL) ./sh.version -l txt -d short VERSION`; \
-        sed -e "s/%define ver .*/%define ver $$V/g" <shtool.spec >shtool.spec.n && mv shtool.spec.n shtool.spec
-
-update-version:
-        @echo "Updating date in version information"; \
-        V=`$(SHELL) ./sh.version -l txt -d short VERSION`;\
-        $(SHELL) ./sh.version -l txt -n "GNU shtool" -p shtool -s $$V VERSION;\
-        V=`$(SHELL) ./sh.version -l txt -d long VERSION`;\
-        sed -e "s/Version .*(.*)/Version $$V/g" <README >README.n && mv README.n README;\
-        V=`$(SHELL) ./sh.version -l txt -d short VERSION`;\
-        sed -e "s/%define ver .*/%define ver $$V/g" <shtool.spec >shtool.spec.n && mv shtool.spec.n shtool.spec
-


ossp-pkg/shtool/devtool -> 1.1

*** /dev/null    Sat Nov 23 01:26:14 2024
--- -    Sat Nov 23 01:26:17 2024
***************
*** 0 ****
--- 1,47 ----
+ #!/bin/sh
+ ##
+ ##  devtool -- Development Tool
+ ##  Copyright (c) 2001 Ralf S. Engelschall <rse@engelschall.com> 
+ ##
+ 
+ if [ $# -eq 0 ]; then
+     echo "devtool:USAGE: devtool <command> [<arg> ...]" 1>&2
+     exit 1
+ fi
+ 
+ cmd="$1"
+ shift
+ 
+ devtoolfunc="./devtool.func"
+ 
+ if [ ! -f devtool.conf ]; then
+     echo "devtool:ERROR: no devtool.conf in current directory" 1>&2
+     exit 1
+ fi
+ 
+ cmdline=`grep "^%$cmd" devtool.conf`
+ if [ ".$cmdline" = . ]; then
+     echo "devtool:ERROR: command $cmd not found in devtool.conf" 1>&2
+     exit 1
+ fi
+ 
+ if [ ".$TMPDIR" != . ]; then
+     tmpdir="$TMPDIR"
+ elif [ ".$TEMPDIR" != . ]; then
+     tmpdir="$TEMPDIR"
+ else
+     tmpdir="/tmp"
+ fi
+ tmpfile="$tmpdir/rc.$$.tmp"
+ 
+ rm -f $tmpfile
+ touch $tmpfile
+ echo ". $devtoolfunc" >>$tmpfile
+ ( sed <devtool.conf -e "1,/^%common/d" -e '/^%.*/,$d'
+   sed <devtool.conf -e "1,/^%$cmd/d" -e '/^%.*/,$d' ) |\
+ sed -e 's;\([  ]\)@\([a-zA-Z_][a-zA-Z0-9_]*\);\1devtool_\2;' >>$tmpfile
+ 
+ sh $tmpfile "$@"
+ 
+ rm -f $tmpfile >/dev/null 2>&1 || true
+ 


ossp-pkg/shtool/devtool.conf -> 1.1

*** /dev/null    Sat Nov 23 01:26:14 2024
--- -    Sat Nov 23 01:26:17 2024
***************
*** 0 ****
--- 1,42 ----
+ ##
+ ##  devtool.conf -- Development Tool Configuration
+ ##
+ 
+ %autogen
+     @autogen autoconf 2.52 "2.5.*"
+ 
+ %autoclean
+     @autoclean autoconf
+ 
+ %configure
+     ./configure --prefix=/tmp/shtool "$@"
+ 
+ %version
+     sh sh.version -l txt -n "GNU shtool" -e VERSION
+     V=`sh sh.version -l txt -d long VERSION`
+     sed -e "s/Version .*(.*)/Version $V/g" <README >README.n 
+     mv README.n README
+     V=`sh sh.version -l txt -d short VERSION`
+     sed -e "s/%define ver .*/%define ver $V/g" <shtool.spec >shtool.spec.n
+     mv shtool.spec.n shtool.spec
+ 
+ %dist
+     echo "+++ generating"
+     ./devtool autoclean
+     ./devtool autogen
+     echo "+++ configuring"
+     ./configure
+     echo "+++ building"
+     make clean all
+     echo "+++ cleaning"
+     make distclean
+     echo "+++ fixing"
+     sh sh.fixperm -v .
+     echo "+++ rolling"
+     V=`sh sh.version -l txt -d short VERSION`
+     sh sh.tarball -o shtool-${V}.tar.gz -d shtool-${V} -u gnu -g shtool \
+                      -e 'CVS,\.cvsignore,\.[ao],^\.,devtool*,*.tar.gz' -c 'gzip --best' .
+     ls -l shtool-${V}.tar.gz
+     echo "+++ testing"
+     gunzip <shtool-${V}.tar.gz | tar tvf -
+ 


ossp-pkg/shtool/devtool.func -> 1.1

*** /dev/null    Sat Nov 23 01:26:14 2024
--- -    Sat Nov 23 01:26:17 2024
***************
*** 0 ****
--- 1,71 ----
+ ##
+ ##  devtool.func -- Development Tool Functions
+ ##  Copyright (c) 2001 Ralf S. Engelschall <rse@engelschall.com> 
+ ##
+ 
+ devtool_require () {
+     t="$1"; o="$2"; p="$3"; e="$4"; a="$5"
+     v=`($t $o | head -1 | awk "{ print \\\$$p; }") 2>/dev/null`
+     if [ ".$v" = . ]; then
+         echo "devtool:ERROR: unable to determine version of $t" 1>&2
+         exit 1
+     fi
+     case "$v" in
+         $e )
+             ;;
+         $a )
+             echo "devtool:WARNING: $t version $v still accepted, although expected $e." 1>&2
+             ;;
+         * )
+             echo "devtool:ERROR: $t version $e expected, but found $v." 1>&2
+             exit 1
+             ;;
+     esac
+     echo "$v"
+ }
+ 
+ devtool_autogen () {
+     tool=$1
+     shift
+     case $tool in
+         autoconf )
+             autoconf_version=`devtool_require autoconf --version 4 "$1" "$2"`
+             echo "generating (GNU Autoconf $autoconf_version): configure config.h.in"
+             autoconf
+             ;;
+         libtool )
+             libtoolize_version=`devtool_require libtoolize --version 4 "$1" "$2"`
+             echo "generating (GNU Libtool $libtoolize_version): ltmain.sh, libtool.m4, config.guess, config.sub"
+             libtoolize --force --copy >/dev/null 2>&1
+             cp `libtoolize --force --copy --dry-run | grep "add the contents of" |\
+                 sed -e 's;^[^\`]*\`;;' -e "s;'.*;;"` libtool.m4
+             ;;
+         shtool )
+             shtoolize_version=`devtool_require shtoolize -v 3 "$1" "$2"`
+             echo "generating (GNU Shtool $shtoolize_version): shtool"
+             shift
+             shift
+             shtoolize -q "$@"
+             ;;
+     esac
+ }
+ 
+ devtool_autoclean () {
+     tool=$1
+     shift
+     case $tool in
+         autoconf )
+             echo "removing: configure config.h.in"
+             rm -f configure config.h.in
+             ;;
+         libtool )
+             echo "removing: ltmain.sh libtool.m4 config.guess config.sub"
+             rm -f ltmain.sh libtool.m4 config.guess config.sub
+             ;;
+         shtool )
+             echo "removing: shtool"
+             rm -f shtool
+             ;;
+     esac
+ }
+ 

CVSTrac 2.0.1