Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/Makefile.am')
-rw-r--r--scripts/Makefile.am31
1 files changed, 17 insertions, 14 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 24b9c12d..7dccff9d 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -2,33 +2,38 @@
AUTOMAKE_OPTIONS = std-options
bin_SCRIPTS = \
- gensync \
+ $(OURSCRIPTS) \
+ repo-remove
+
+OURSCRIPTS = \
makepkg \
pacman-optimize \
rankmirrors \
- repo-add \
- repo-remove \
- updatesync
+ repo-add
EXTRA_DIST = \
- gensync.sh.in \
makepkg.sh.in \
pacman-optimize.sh.in \
rankmirrors.py.in \
- repo-add.sh.in \
- repo-remove.sh.in \
- updatesync.sh.in
+ repo-add.sh.in
# Files that should be removed, but which Automake does not know.
MOSTLYCLEANFILES = $(bin_SCRIPTS) *.tmp
+if USE_GIT_VERSION
+GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 | sed s/^v//')-dirty
+REAL_PACKAGE_VERSION = $(GIT_VERSION)
+else
+REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
+endif
+
#### Taken from the autoconf scripts Makefile.am ####
edit = sed \
-e 's|@localedir[@]|$(localedir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@prefix[@]|$(prefix)|g' \
- -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g' \
+ -e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
-e 's|@DBEXT[@]|$(DBEXT)|g' \
@@ -39,7 +44,7 @@ edit = sed \
## wrong file by accident.
# two 'test' lines- make sure we can handle both sh and py type scripts
# third 'test' line- make sure one of the two checks succeeded
-$(bin_SCRIPTS): Makefile
+$(OURSCRIPTS): Makefile
rm -f $@ $@.tmp
test -f $(srcdir)/$@.sh.in && $(edit) $(srcdir)/$@.sh.in >$@.tmp || true
test -f $(srcdir)/$@.py.in && $(edit) $(srcdir)/$@.py.in >$@.tmp || true
@@ -48,13 +53,11 @@ $(bin_SCRIPTS): Makefile
chmod a-w $@.tmp
mv $@.tmp $@
-gensync: $(srcdir)/gensync.sh.in
makepkg: $(srcdir)/makepkg.sh.in
pacman-optimize: $(srcdir)/pacman-optimize.sh.in
rankmirrors: $(srcdir)/rankmirrors.py.in
repo-add: $(srcdir)/repo-add.sh.in
-repo-remove: $(srcdir)/repo-remove.sh.in
-re-pacman: $(srcdir)/re-pacman.sh.in
-updatesync: $(srcdir)/updatesync.sh.in
+repo-remove: $(srcdir)/repo-add.sh.in
+ ln -sf repo-add repo-remove
# vim:set ts=2 sw=2 noet: