make install for `po' and DESTDIR
Tim Mooney
mooney at dogbert.cc.ndsu.NoDak.edu
Tue Sep 19 15:23:12 CEST 2000
Almost all of gnupg 1.0.3 supports using
make install DESTDIR=/some/directory
to do a buildroot'ed install (common when packaging). The one area that
doesn't is the `po' directory, probably because that area isn't using
automake and DESTDIR is "free" with automake.
The included patch adds DESTDIR support to the po/Makefile.in.in, so that
one can
make install DESTDIR=/some/directory
from the gnupg-1.0.3 directory and have *all* the bits installed under
the DESTDIR.
Tim
--
Tim Mooney mooney at dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
--- gnupg-1.0.3.orig/po/Makefile.in.in Tue Jan 25 11:44:18 2000
+++ gnupg-1.0.3/po/Makefile.in.in Tue Sep 19 13:22:44 2000
@@ -24,6 +24,9 @@
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
+# Handle BuildRoot installs easily
+DESTDIR=
+
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
@@ -111,9 +114,9 @@
install-data-no: all
install-data-yes: all
if test -r "$(MKINSTALLDIRS)"; then \
- $(MKINSTALLDIRS) $(datadir); \
+ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
- $(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
@@ -125,27 +128,27 @@
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \
if test -r "$(MKINSTALLDIRS)"; then \
- $(MKINSTALLDIRS) $$dir; \
+ $(MKINSTALLDIRS) $(DESTDIR)$$dir; \
else \
- $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
+ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$$dir; \
fi; \
if test -r $$cat; then \
- $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
- echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
+ echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
else \
- $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
+ $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
- "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
+ "$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
- $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
- echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ $(INSTALL_DATA) $$cat.m $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ echo "installing $$cat.m as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
- $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
+ $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
- "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
+ "$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
@@ -171,10 +174,10 @@
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
- rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
+ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
done
rm -f $(gettextsrcdir)/po-Makefile.in.in
More information about the Gnupg-devel
mailing list