summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-11-07 15:06:55 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-11-07 15:06:55 -0300
commit73b813613aa08646515f4e06c71503b18125cec3 (patch)
tree5b98b01f1c331692e2dcae4fd4f6fb4e4a7064df
parent6c14fad1750b4342b5b283e0851c00e3c074a15c (diff)
parent040111e9d8419456255816600784a496febd57b0 (diff)
Merge branch 'master' of git://gitorious.org/parabola/libretools
-rw-r--r--Makefile68
-rwxr-xr-xlb16
-rwxr-xr-xsrc/abslibre-tools/abslibre-commit (renamed from abslibre-commit)0
-rwxr-xr-xsrc/abslibre-tools/createworkdir (renamed from createworkdir)0
-rwxr-xr-xsrc/abslibre-tools/libreaddiff (renamed from libreaddiff)0
-rwxr-xr-xsrc/abslibre-tools/librecommit (renamed from librecommit)0
-rwxr-xr-xsrc/abslibre-tools/librerelease (renamed from librerelease)0
-rwxr-xr-xsrc/abslibre-tools/librestage (renamed from librestage)0
-rwxr-xr-xsrc/abslibre-tools/updateabslibre (renamed from updateabslibre)0
-rwxr-xr-xsrc/aur (renamed from aur)0
-rwxr-xr-xsrc/chroot-tools/buildenv (renamed from buildenv)0
-rwxr-xr-xsrc/chroot-tools/chcleanup (renamed from chcleanup)0
-rwxr-xr-xsrc/chroot-tools/librechroot (renamed from librechroot)0
-rwxr-xr-xsrc/chroot-tools/libremakepkg (renamed from libremakepkg)0
-rwxr-xr-xsrc/chroot-tools/libremkchroot (renamed from libremkchroot)0
-rwxr-xr-xsrc/diff-unfree (renamed from diff-unfree)0
-rwxr-xr-xsrc/fullpkg/fullpkg (renamed from fullpkg)0
-rwxr-xr-xsrc/fullpkg/fullpkg-build (renamed from fullpkg-build)0
-rwxr-xr-xsrc/fullpkg/fullpkg-find (renamed from fullpkg-find)0
-rwxr-xr-xsrc/is_built (renamed from is_built)0
-rwxr-xr-xsrc/is_unfree (renamed from is_unfree)0
-rwxr-xr-xsrc/librediff (renamed from librediff)0
-rwxr-xr-xsrc/libremessages (renamed from libremessages)0
-rwxr-xr-xsrc/librerepkg (renamed from librerepkg)0
-rw-r--r--src/libretools.conf (renamed from libretools.conf)0
-rwxr-xr-xsrc/mips64el-tools/add-mips64el (renamed from add-mips64el)0
-rwxr-xr-xsrc/mips64el-tools/librebasebuilder (renamed from librebasebuilder)0
-rwxr-xr-x[-rw-r--r--]src/mips64el-tools/mips-add (renamed from mips64el/mips-add)0
-rw-r--r--src/mips64el-tools/mips64el.conf (renamed from mips64el/mips64el.conf)0
-rwxr-xr-xsrc/mips64el-tools/mipsrelease (renamed from mips64el/mipsrelease)0
-rwxr-xr-xsrc/pkgbuild-check-nonfree (renamed from pkgbuild-check-nonfree)0
-rwxr-xr-xsrc/pr-tools/prfullpkg (renamed from prtools/prfullpkg)0
-rwxr-xr-xsrc/pr-tools/prmipsrelease (renamed from prtools/prmipsrelease)0
-rw-r--r--src/pr-tools/prtools.conf (renamed from prtools/prtools.conf)0
-rwxr-xr-x[-rw-r--r--]src/pr-tools/prtoru (renamed from prtools/prtoru)0
-rwxr-xr-xsrc/toru/toru (renamed from toru)0
-rwxr-xr-xsrc/toru/toru-info (renamed from toru-info)0
-rwxr-xr-xsrc/toru/toru-path (renamed from toru-path)0
-rwxr-xr-xsrc/toru/toru-utils (renamed from toru-utils)0
-rwxr-xr-xsrc/toru/toru-where (renamed from toru-where)0
-rwxr-xr-xsrc/treepkg (renamed from treepkg)0
-rwxr-xr-xsrc/update-cleansystem (renamed from update-cleansystem)0
42 files changed, 68 insertions, 16 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..802117a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,68 @@
+# Configuration
+DESTDIR=
+
+#prefix=/usr/local
+prefix=/usr
+exec_prefix=$(prefix)
+datarootdir=$(prefix)/share
+
+bindir=$(exec_prefix)/bin
+sbindir=$(exec_prefix)/sbin
+#sysconfdir=$(prefix)/etc
+sysconfdir=/etc
+datadir=$(datarootdir)
+docdir=$(datarootdir)/doc
+
+################################################################################
+
+pseudo-packages=abslibre-tools chroot-tools fullpkg mips64el-tools pr-tools toru
+packages=libretools libretools-pr libretools-mips64el
+
+libretools=abslibre-tools chroot-tools fullpkg toru misc
+libretools-pr=pr-tools
+libretools-mips64el=mips64el-tools
+
+################################################################################
+
+all: PHONY libretools
+install: PHONY install-libretools install-doc
+
+install-doc: $(patsubst doc/%,$(DESTDIR)$(docdir)/libretools/%,$(wildcard doc/*))
+
+$(DESTDIR)$(docdir)/libretools/%: doc/%
+ install -Dm644 '$<' '$@'
+
+$(DESTDIR)$(sysconfdir)/libretools.conf: src/libretools.conf
+ install -Dm644 '$<' '$@'
+
+$(foreach pkg,$(pseudo-packages) ., \
+$(eval \
+$(DESTDIR)$(bindir)/%: src/$(pkg)/%; \
+ install -Dm755 '$$<' '$$@' \
+) \
+$(eval \
+$(DESTDIR)$(sysconfdir)/libretools.d/%: src/$(pkg)/%; \
+ install -Dm644 '$$<' '$$@' \
+))
+
+################################################################################
+
+progs = $(shell find src/$1 -maxdepth 1 -type f -executable -printf '%f\n')
+confs = $(shell find src/$1 -maxdepth 1 -type f -not -executable -printf '%f\n')
+files = $(addprefix $(DESTDIR)$2/,$(call progs,$1)) \
+ $(addprefix $(DESTDIR)$3/,$(call confs,$1))
+
+.SECONDEXPANSION:
+$(packages): %: PHONY $$($$*)
+$(addprefix install-,$(packages)): install-%: PHONY $$(addprefix install-,$$($$*))
+
+$(pseudo-packages) misc: %: PHONY
+$(addprefix install-,$(pseudo-packages)): install-%: PHONY $$(call files,$$*,$(bindir),$(sysconfdir)/libretools.d)
+# special cases
+install-misc: PHONY $(call files,.,$(bindir),$(sysconfdir))
+
+################################################################################
+
+FORCE: PHONY
+PHONY:
+.PHONY: FORCE PHONY
diff --git a/lb b/lb
deleted file mode 100755
index 85fb4df..0000000
--- a/lb
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-# LibreTools wrapper
-# License: GPLv3
-
-source /etc/libretools.conf
-
-command=$1; shift
-
-[[ ! -x ~/l/libre"${command}" ]] && {
- error "Command not found"
- exit 1
-}
-
-~/l/libre${command} "$@"
-
-exit $?
diff --git a/abslibre-commit b/src/abslibre-tools/abslibre-commit
index e906fbd..e906fbd 100755
--- a/abslibre-commit
+++ b/src/abslibre-tools/abslibre-commit
diff --git a/createworkdir b/src/abslibre-tools/createworkdir
index b443c08..b443c08 100755
--- a/createworkdir
+++ b/src/abslibre-tools/createworkdir
diff --git a/libreaddiff b/src/abslibre-tools/libreaddiff
index 98646a2..98646a2 100755
--- a/libreaddiff
+++ b/src/abslibre-tools/libreaddiff
diff --git a/librecommit b/src/abslibre-tools/librecommit
index 1698bed..1698bed 100755
--- a/librecommit
+++ b/src/abslibre-tools/librecommit
diff --git a/librerelease b/src/abslibre-tools/librerelease
index efb698e..efb698e 100755
--- a/librerelease
+++ b/src/abslibre-tools/librerelease
diff --git a/librestage b/src/abslibre-tools/librestage
index b474bb1..b474bb1 100755
--- a/librestage
+++ b/src/abslibre-tools/librestage
diff --git a/updateabslibre b/src/abslibre-tools/updateabslibre
index 76f964a..76f964a 100755
--- a/updateabslibre
+++ b/src/abslibre-tools/updateabslibre
diff --git a/aur b/src/aur
index 3d07cd8..3d07cd8 100755
--- a/aur
+++ b/src/aur
diff --git a/buildenv b/src/chroot-tools/buildenv
index 84a1fc2..84a1fc2 100755
--- a/buildenv
+++ b/src/chroot-tools/buildenv
diff --git a/chcleanup b/src/chroot-tools/chcleanup
index 17c1f02..17c1f02 100755
--- a/chcleanup
+++ b/src/chroot-tools/chcleanup
diff --git a/librechroot b/src/chroot-tools/librechroot
index 158828b..158828b 100755
--- a/librechroot
+++ b/src/chroot-tools/librechroot
diff --git a/libremakepkg b/src/chroot-tools/libremakepkg
index f7924f6..f7924f6 100755
--- a/libremakepkg
+++ b/src/chroot-tools/libremakepkg
diff --git a/libremkchroot b/src/chroot-tools/libremkchroot
index b576209..b576209 100755
--- a/libremkchroot
+++ b/src/chroot-tools/libremkchroot
diff --git a/diff-unfree b/src/diff-unfree
index a0a8d63..a0a8d63 100755
--- a/diff-unfree
+++ b/src/diff-unfree
diff --git a/fullpkg b/src/fullpkg/fullpkg
index 9a03b82..9a03b82 100755
--- a/fullpkg
+++ b/src/fullpkg/fullpkg
diff --git a/fullpkg-build b/src/fullpkg/fullpkg-build
index b497db5..b497db5 100755
--- a/fullpkg-build
+++ b/src/fullpkg/fullpkg-build
diff --git a/fullpkg-find b/src/fullpkg/fullpkg-find
index e188ec8..e188ec8 100755
--- a/fullpkg-find
+++ b/src/fullpkg/fullpkg-find
diff --git a/is_built b/src/is_built
index 1fa79d2..1fa79d2 100755
--- a/is_built
+++ b/src/is_built
diff --git a/is_unfree b/src/is_unfree
index f32c193..f32c193 100755
--- a/is_unfree
+++ b/src/is_unfree
diff --git a/librediff b/src/librediff
index 1f39eb9..1f39eb9 100755
--- a/librediff
+++ b/src/librediff
diff --git a/libremessages b/src/libremessages
index 68badb8..68badb8 100755
--- a/libremessages
+++ b/src/libremessages
diff --git a/librerepkg b/src/librerepkg
index 5cb0fa3..5cb0fa3 100755
--- a/librerepkg
+++ b/src/librerepkg
diff --git a/libretools.conf b/src/libretools.conf
index 8032397..8032397 100644
--- a/libretools.conf
+++ b/src/libretools.conf
diff --git a/add-mips64el b/src/mips64el-tools/add-mips64el
index e06d857..e06d857 100755
--- a/add-mips64el
+++ b/src/mips64el-tools/add-mips64el
diff --git a/librebasebuilder b/src/mips64el-tools/librebasebuilder
index f7d3a25..f7d3a25 100755
--- a/librebasebuilder
+++ b/src/mips64el-tools/librebasebuilder
diff --git a/mips64el/mips-add b/src/mips64el-tools/mips-add
index da9b431..da9b431 100644..100755
--- a/mips64el/mips-add
+++ b/src/mips64el-tools/mips-add
diff --git a/mips64el/mips64el.conf b/src/mips64el-tools/mips64el.conf
index 836b407..836b407 100644
--- a/mips64el/mips64el.conf
+++ b/src/mips64el-tools/mips64el.conf
diff --git a/mips64el/mipsrelease b/src/mips64el-tools/mipsrelease
index 4d7a7de..4d7a7de 100755
--- a/mips64el/mipsrelease
+++ b/src/mips64el-tools/mipsrelease
diff --git a/pkgbuild-check-nonfree b/src/pkgbuild-check-nonfree
index df0ff36..df0ff36 100755
--- a/pkgbuild-check-nonfree
+++ b/src/pkgbuild-check-nonfree
diff --git a/prtools/prfullpkg b/src/pr-tools/prfullpkg
index bbb8d73..bbb8d73 100755
--- a/prtools/prfullpkg
+++ b/src/pr-tools/prfullpkg
diff --git a/prtools/prmipsrelease b/src/pr-tools/prmipsrelease
index 1fbd696..1fbd696 100755
--- a/prtools/prmipsrelease
+++ b/src/pr-tools/prmipsrelease
diff --git a/prtools/prtools.conf b/src/pr-tools/prtools.conf
index 5b41216..5b41216 100644
--- a/prtools/prtools.conf
+++ b/src/pr-tools/prtools.conf
diff --git a/prtools/prtoru b/src/pr-tools/prtoru
index 2898b66..2898b66 100644..100755
--- a/prtools/prtoru
+++ b/src/pr-tools/prtoru
diff --git a/toru b/src/toru/toru
index 28f0b8a..28f0b8a 100755
--- a/toru
+++ b/src/toru/toru
diff --git a/toru-info b/src/toru/toru-info
index 523f682..523f682 100755
--- a/toru-info
+++ b/src/toru/toru-info
diff --git a/toru-path b/src/toru/toru-path
index baeaeb5..baeaeb5 100755
--- a/toru-path
+++ b/src/toru/toru-path
diff --git a/toru-utils b/src/toru/toru-utils
index 316e6b8..316e6b8 100755
--- a/toru-utils
+++ b/src/toru/toru-utils
diff --git a/toru-where b/src/toru/toru-where
index e9ab29d..e9ab29d 100755
--- a/toru-where
+++ b/src/toru/toru-where
diff --git a/treepkg b/src/treepkg
index 8c4cc8e..8c4cc8e 100755
--- a/treepkg
+++ b/src/treepkg
diff --git a/update-cleansystem b/src/update-cleansystem
index 6bec742..6bec742 100755
--- a/update-cleansystem
+++ b/src/update-cleansystem