[pacman-dev] [PATCH 2/5] makepkg: add LIBRARY variable

awhetter.2011 at my.bristol.ac.uk awhetter.2011 at my.bristol.ac.uk
Sun Aug 25 08:14:20 EDT 2013


From: Allan McRae <allan at archlinux.org>

This points makepkg to where is library is located.  Can be
overridden by value in the environment.

Signed-off-by: Allan McRae <allan at archlinux.org>
(cherry picked from commit ab65d89fb622252eafd6f31b17d7bbcffa89dda7)
Signed-off-by: Ashley Whetter <awhetter.2011 at my.bristol.ac.uk>

Conflicts:
	scripts/makepkg.sh.in
---
 scripts/Makefile.am   | 3 +++
 scripts/makepkg.sh.in | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index f45065d..8130704 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -39,6 +39,8 @@ LIBRARY = \
 # Files that should be removed, but which Automake does not know.
 MOSTLYCLEANFILES = $(bin_SCRIPTS)
 
+libmakepkgdir = $(libdir)/makepkg
+
 clean-local:
 	$(AM_V_at)$(RM) -r .lib
 
@@ -54,6 +56,7 @@ edit = sed \
 	-e 's|@localedir[@]|$(localedir)|g' \
 	-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
 	-e 's|@localstatedir[@]|$(localstatedir)|g' \
+	-e 's|@libmakepkgdir[@]|$(libmakepkgdir)|g' \
 	-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
 	-e 's|@prefix[@]|$(prefix)|g' \
 	-e '1s|!/bin/bash|!$(BASH_SHELL)|g' \
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 025f756..98cc2aa 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -46,6 +46,8 @@ declare -r confdir='@sysconfdir@'
 declare -r BUILDSCRIPT='@BUILDSCRIPT@'
 declare -r startdir="$PWD"
 
+LIBRARY=${LIBRARY:-'@libmakepkgdir@'}
+
 packaging_options=('strip' 'docs' 'libtool' 'staticlibs' 'emptydirs' 'zipman' \
                    'purge' 'upx' 'debug')
 other_options=('ccache' 'distcc' 'buildflags' 'makeflags')
-- 
1.8.4



More information about the pacman-dev mailing list