1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-11-10 11:35:00 -05:00
pacman/scripts/Makefile.am
Xavier Chantry 9fa18d9a4b Add pkgdelta script to create deltas.
This should obsolete the delta support in makepkg. Having a separate script
should be more flexible.

Example usage:
$ pkgdelta repo/tzdata-2009a-1-x86_64.pkg.tar.gz repo/tzdata-2009b-1-x86_64.pkg.tar.gz
==> Generating delta from version 2009a-1 to version 2009b-1
==> Generated delta : 'repo/tzdata-2009a-1_to_2009b-1-x86_64.delta'

Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
2009-03-15 18:10:15 +01:00

71 lines
2.1 KiB
Makefile

# enforce that all scripts have a --help and --version option
AUTOMAKE_OPTIONS = std-options
bin_SCRIPTS = \
$(OURSCRIPTS) \
repo-remove
OURSCRIPTS = \
makepkg \
pacman-optimize \
pkgdelta \
rankmirrors \
repo-add
EXTRA_DIST = \
makepkg.sh.in \
pacman-optimize.sh.in \
pkgdelta.sh.in \
rankmirrors.py.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[@]|$(REAL_PACKAGE_VERSION)|g' \
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
-e 's|@DBEXT[@]|$(DBEXT)|g' \
-e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \
-e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
## All the scripts depend on Makefile so that they are rebuilt when the
## prefix etc. changes. Use chmod -w to prevent people from editing the
## 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
$(OURSCRIPTS): Makefile
@echo ' ' GEN $@;
@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
@test -f $@.tmp || false
@chmod +x $@.tmp
@chmod a-w $@.tmp
@mv $@.tmp $@
makepkg: $(srcdir)/makepkg.sh.in
pacman-optimize: $(srcdir)/pacman-optimize.sh.in
pkgdelta: $(srcdir)/pkgdelta.sh.in
rankmirrors: $(srcdir)/rankmirrors.py.in
repo-add: $(srcdir)/repo-add.sh.in
repo-remove: $(srcdir)/repo-add.sh.in
rm -f repo-remove
$(LN_S) repo-add repo-remove
# vim:set ts=2 sw=2 noet: