diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2009-11-29 00:34:00 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-06-26 00:30:19 -0600 |
commit | d4a42ee34928970141b8299c104d47c0f3faecd0 (patch) | |
tree | df2f64b260c78466f468d367aae67e1ba47b0cb1 /pkgthing | |
parent | 3d48e43b9a2c8073663dea1f29815bfc3989c704 (diff) |
add copyright notices, and start to autoconfiscate
Diffstat (limited to 'pkgthing')
-rw-r--r-- | pkgthing/.sh (renamed from pkgthing/init) | 0 | ||||
-rw-r--r-- | pkgthing/config | 2 | ||||
-rw-r--r-- | pkgthing/main.mk.in | 5 | ||||
-rw-r--r-- | pkgthing/pkgthing.mk | 41 | ||||
-rw-r--r-- | pkgthing/search | 19 | ||||
-rw-r--r-- | pkgthing/src/libexec/find.sh (renamed from pkgthing/find) | 19 | ||||
-rw-r--r-- | pkgthing/src/libexec/search.sh | 36 | ||||
-rw-r--r-- | pkgthing/src/pkgthing.mk.in | 59 | ||||
-rw-r--r--[-rwxr-xr-x] | pkgthing/src/pkgthing.sh (renamed from pkgthing/pkgthing) | 3 |
9 files changed, 120 insertions, 64 deletions
diff --git a/pkgthing/init b/pkgthing/.sh index 4f5f784..4f5f784 100644 --- a/pkgthing/init +++ b/pkgthing/.sh diff --git a/pkgthing/config b/pkgthing/config new file mode 100644 index 0000000..f9d61de --- /dev/null +++ b/pkgthing/config @@ -0,0 +1,2 @@ +_ver=`cat $_srcdir/Version` +vars="$vars ver" diff --git a/pkgthing/main.mk.in b/pkgthing/main.mk.in index 7048bbc..f17ab76 100644 --- a/pkgthing/main.mk.in +++ b/pkgthing/main.mk.in @@ -14,10 +14,11 @@ ver = 0.0 # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; see the file COPYIN +# along with this program; see the file COPYING. +# If not, see <http://www.gnu.org/licenses>. # general stuffs ##################################################### -all : pget +all : src/libexec/find src/libexec/search src/pkgthing src/pkgthing.mk .SUFFIXES : VPATH = $(srcdir) filelist = \ diff --git a/pkgthing/pkgthing.mk b/pkgthing/pkgthing.mk deleted file mode 100644 index 29322b6..0000000 --- a/pkgthing/pkgthing.mk +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/make -f -name = pkgthing -ver = 2.9.0 - -usage = Usage: make [-C /usr/src] TARGET -email = LukeShu@sbcglobal.net - -datadir = /usr/src/local/pkgthing - -.PHONY: shorthelp help version -shorthelp: - # $(name): please specify an action - # $(usage) - # - # Try `make -C /usr/src help' for more options - -help: - # $(name) $(ver), package thing(y) - THing Is Not GNU (yet?) - # $(usage) - # - # ... - # - # Mail bug reports and suggestions to <$(email)> - -version: - # $(name) $(ver) - # - # Copyright (C) 2009 Luke Shumaker, Inc. - # Licence GPLv2+: GNU GPL version 2 or later - # <http://www.gnu.org/licenses/gpl.html>. - # This is free software: you are free to change and redistribute it. - # There is NO WARRANTY, to the extent permitted by law. - # - # Originally written by Luke Shumaker <$(email)> - -#.PHONY: init $(addprefix init-,$(shell echo *.lst)) -init: $(addprefix init-,$(shell echo *.lst)) - -init-%: % - # loading `$<'... - bash $(datadir)/init "$<" diff --git a/pkgthing/search b/pkgthing/search deleted file mode 100644 index a9aade0..0000000 --- a/pkgthing/search +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -pkg=$1 -src=${2-*} - -printname() { - name=$1 - echo -n "$name" - if [ -L "${name%/}" ]; then - echo -n ' -> ' - printname `readlink "${name%/}"` - else - echo '' # or, rather: putchar('\n'); - fi -} - -for i in $src/*/"$pkg/" $src/*/"$pkg.README"; do - if [ -e "$i" ]; then printname "$i"; fi -done diff --git a/pkgthing/find b/pkgthing/src/libexec/find.sh index 4b33612..82d8f3a 100644 --- a/pkgthing/find +++ b/pkgthing/src/libexec/find.sh @@ -1,4 +1,21 @@ #!/bin/bash +#name=pkgthing program finder +#version=??? +# Copyright (C) 2009 Luke Shumaker +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see <http://www.gnu.org/licenses>. # option handling case "$1" in @@ -33,7 +50,7 @@ useVar() { case "$var" in \$name) _name="$val";; \$union) :;; - \$progs) + \$progs) checkList "$prog" "$_name" "$val" :;; esac diff --git a/pkgthing/src/libexec/search.sh b/pkgthing/src/libexec/search.sh new file mode 100644 index 0000000..7df0541 --- /dev/null +++ b/pkgthing/src/libexec/search.sh @@ -0,0 +1,36 @@ +#!/bin/sh +#name=pkgthing package search +#version=??? +# Copyright (C) 2009 Luke Shumaker +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see <http://www.gnu.org/licenses>. + +pkg=$1 +src=${2-*} + +printname() { + name=$1 + echo -n "$name" + if [ -L "${name%/}" ]; then + echo -n ' -> ' + printname `readlink "${name%/}"` + else + echo '' # or, rather: putchar('\n'); + fi +} + +for i in $src/*/"$pkg/" $src/*/"$pkg.README"; do + if [ -e "$i" ]; then printname "$i"; fi +done diff --git a/pkgthing/src/pkgthing.mk.in b/pkgthing/src/pkgthing.mk.in new file mode 100644 index 0000000..ae56543 --- /dev/null +++ b/pkgthing/src/pkgthing.mk.in @@ -0,0 +1,59 @@ +#!/usr/bin/make -f +_pkg_name = pkgthing # name of the program, duh +_pkg_ver = @ver@ # version number +# Copyright (C) 2009 Luke Shumaker +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. +# If not, see <http://www.gnu.org/licenses>. + +#for use in messages +_pkg_usage = Usage: make [-C /usr/src] TARGET +_pkg_email = LukeShu@sbcglobal.net + +_pkg_libexecdir = @libexecdir@/$(_pkg_name) # the location of helper-scripts +_pkg_update = update # the make target to update package lists + +.PHONY: shorthelp help version +shorthelp: + # $(_pkg_name): please specify an action + # $(_pkg_usage) + # + # Try `make -C /usr/src help' for more options + +help: + # $(_pkg_name) $(_pkg_ver), package thing(y) - THing Is Not GNU (Yet?) + # $(_pkg_usage) + # + # ... + # + # Mail bug reports and suggestions to <$(_pkg_email)> + +version: + # $(_pkg_name) $(_pkg_ver) + # + # Copyright (C) 2009 Luke Shumaker, Inc. + # Licence GPLv2+: GNU GPL version 2 or later + # <http://www.gnu.org/licenses/gpl.html>. + # This is free software: you are free to change and redistribute it. + # There is NO WARRANTY, to the extent permitted by law. + # + # Originally written by Luke Shumaker <$(_pkg_email)> + +#.PHONY: $(_pkg_update) $(addprefix $(_pkg_update)-,$(shell echo *.lst)) + $(_pkg_update): $(addprefix $(_pkg_update)-,$(shell echo *.lst)) + +$(_pkg_update)-%: % + # loading `$<'... + bash $(_pkg_libexecdir)/init "$<" + diff --git a/pkgthing/pkgthing b/pkgthing/src/pkgthing.sh index 9439461..38c5ae5 100755..100644 --- a/pkgthing/pkgthing +++ b/pkgthing/src/pkgthing.sh @@ -1,6 +1,7 @@ #!/bin/sh name='pkgthing' -export datadir=/usr/src/local/pkgthing +ver=@ver@ +export libexecdir=@libexecdir@ srcdir=/usr/src |