summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-08-24 17:32:22 +0000
committerjstebbins <[email protected]>2009-08-24 17:32:22 +0000
commit2752e26db58d8304e3ddb03a9b95c4f9af7bf5fa (patch)
tree20bcb6484190356bc65bd0448cd4ca3f7f36ba80
parent9e43a26a870845acafbeff92f62db3609c48e37c (diff)
build system: some changes that simplify things for packaging tools
- Add DESTDIR to install path for HandBrakeCLI - Modify linux packaging rules for deb and rpm packages to use DESTDIR - lingui: only update icon cache during install if DESTDIR is not set - patch out the hardcoded install path for m4 macros in libdvdread and libdvdnav when uid==0 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2774 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--contrib/libdvdnav/A04-m4-uid0.patch28
-rw-r--r--contrib/libdvdread/A03-m4-uid0.patch28
-rw-r--r--gtk/ghb.spec2
-rw-r--r--gtk/src/Makefile.am4
-rwxr-xr-xpkg/linux/debian/rules2
-rw-r--r--pkg/linux/module.rules1
-rw-r--r--test/module.defs2
7 files changed, 61 insertions, 6 deletions
diff --git a/contrib/libdvdnav/A04-m4-uid0.patch b/contrib/libdvdnav/A04-m4-uid0.patch
new file mode 100644
index 000000000..49638279b
--- /dev/null
+++ b/contrib/libdvdnav/A04-m4-uid0.patch
@@ -0,0 +1,28 @@
+diff -Naur libdvdnav.orig/configure.ac libdvdnav/configure.ac
+--- libdvdnav.orig/configure.ac 2009-01-08 14:57:11.000000000 -0800
++++ libdvdnav/configure.ac 2009-08-24 10:20:16.560743586 -0700
+@@ -206,24 +206,6 @@
+
+ AC_SUBST(DEBUG_CFLAGS)
+
+-dnl ---------------------------------------------
+-dnl Get where .m4 should be installed.
+-dnl ---------------------------------------------
+-case "`id`" in
+- uid=0\(* )
+- AC_MSG_CHECKING(for aclocal directory)
+- if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+- ACLOCAL_DIR="`eval $ACLOCAL --print-ac-dir`"
+- AC_MSG_RESULT($ACLOCAL_DIR)
+- else
+- ACLOCAL_DIR="/usr/local/share/aclocal"
+- AC_MSG_RESULT(none - will be installed in $ACLOCAL_DIR)
+- fi
+- escapedprefix="`echo $prefix | sed -e 's/\\//\\\\\//g'`"
+- ACLOCAL_DIR="`echo $ACLOCAL_DIR|sed -e 's/^'$escapedprefix/'\${prefix}'/`"
+- AC_SUBST(ACLOCAL_DIR)
+- ;;
+-esac
+ AM_CONDITIONAL(INSTALL_M4, test x"$ACLOCAL_DIR" != "x")
+
+ dnl ---------------------------------------------
diff --git a/contrib/libdvdread/A03-m4-uid0.patch b/contrib/libdvdread/A03-m4-uid0.patch
new file mode 100644
index 000000000..eab26177c
--- /dev/null
+++ b/contrib/libdvdread/A03-m4-uid0.patch
@@ -0,0 +1,28 @@
+diff -Naur libdvdread.orig/configure.ac libdvdread/configure.ac
+--- libdvdread.orig/configure.ac 2009-01-08 14:57:10.000000000 -0800
++++ libdvdread/configure.ac 2009-08-24 10:17:47.036747814 -0700
+@@ -167,24 +167,6 @@
+
+ AC_SUBST(DEBUG_CFLAGS)
+
+-dnl ---------------------------------------------
+-dnl Get where .m4 should be installed.
+-dnl ---------------------------------------------
+-case "`id`" in
+- uid=0\(* )
+- AC_MSG_CHECKING(for aclocal directory)
+- if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+- ACLOCAL_DIR="`eval $ACLOCAL --print-ac-dir`"
+- AC_MSG_RESULT($ACLOCAL_DIR)
+- else
+- ACLOCAL_DIR="/usr/local/share/aclocal"
+- AC_MSG_RESULT(none - will be installed in $ACLOCAL_DIR)
+- fi
+- escapedprefix="`echo $prefix | sed -e 's/\\//\\\\\//g'`"
+- ACLOCAL_DIR="`echo $ACLOCAL_DIR|sed -e 's/^'$escapedprefix/'\${prefix}'/`"
+- AC_SUBST(ACLOCAL_DIR)
+- ;;
+-esac
+ AM_CONDITIONAL(INSTALL_M4, test x"$ACLOCAL_DIR" != "x")
+
+ dnl ---------------------------------------------
diff --git a/gtk/ghb.spec b/gtk/ghb.spec
index f39d4fcd5..5b838531c 100644
--- a/gtk/ghb.spec
+++ b/gtk/ghb.spec
@@ -50,7 +50,7 @@ transcoder, available for MacOS X, Linux and Windows.
%install
#rm -rf $RPM_BUILD_ROOT
# I don't want to rebuild the world, so just install what I've prebuilt
-make -C $RPM_BUILD_ROOT/../.. PREFIX=$RPM_BUILD_ROOT/usr PREFIX/=$RPM_BUILD_ROOT/usr/ install
+make -C $RPM_BUILD_ROOT/../.. DESTDIR=$RPM_BUILD_ROOT install
## blow away stuff we don't want
/bin/rm -f $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/icon-theme.cache
diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am
index 5dbecd50a..52be4d1c2 100644
--- a/gtk/src/Makefile.am
+++ b/gtk/src/Makefile.am
@@ -149,7 +149,7 @@ uninstall-local:
fi; \
rm -f $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
done
- @-if test -d "$(DESTDIR)/$(datadir)"; then \
+ @-if test -z "$(DESTDIR)"; then \
echo "Updating Gtk icon cache."; \
$(gtk_update_icon_cache); \
else \
@@ -171,7 +171,7 @@ install-data-local:
mkdir -p $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/; \
$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)/$(datadir)/icons/hicolor/$$SIZE/apps/$$FILE; \
done
- @-if test -d "$(DESTDIR)/$(datadir)"; then \
+ @-if test -z "$(DESTDIR)"; then \
echo "Updating Gtk icon cache."; \
$(gtk_update_icon_cache); \
else \
diff --git a/pkg/linux/debian/rules b/pkg/linux/debian/rules
index a30f4fb1d..4ce0ec08d 100755
--- a/pkg/linux/debian/rules
+++ b/pkg/linux/debian/rules
@@ -43,7 +43,7 @@ install: build
dh_testdir
dh_testroot
dh_installdirs
- $(MAKE) -C $(BUILDDIR) PREFIX=$(CURDIR)/debian/tmp/usr PREFIX/=$(CURDIR)/debian/tmp/usr/ install
+ $(MAKE) -C $(BUILDDIR) DESTDIR=$(CURDIR)/debian/tmp install
# Build architecture-independent files here.
binary-indep: build install
diff --git a/pkg/linux/module.rules b/pkg/linux/module.rules
index 2d5b1a223..c3346be5b 100644
--- a/pkg/linux/module.rules
+++ b/pkg/linux/module.rules
@@ -12,7 +12,6 @@ $(PKG.gui.rpm) $(PKG.cli.rpm):
$(CP.exe) $(GTK.src/)ghb.spec $(RPM.out/)SPECS
$(CP.exe) $(PKG.src.tar.bz2) $(RPM.out/)SOURCES
$(TAR.exe) -xf $(PKG.src.tar.bz2) -C $(RPM.out/)BUILD
-# fakeroot $(MAKE) PREFIX=$(RPMROOT.out/)usr PREFIX/=$(RPMROOT.out/)usr/ install
rpmbuild --define="version $(HB.version)" --define="_topdir $(PWD)/$(RPM.out)" --buildroot $(RPMROOT.out) -ba $(GTK.src/)ghb.spec
$(CP.exe) $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name)-cli-$(HB.version)*.rpm $(PKG.cli.rpm)
$(CP.exe) $(RPM.out/)RPMS/$(PKG.rpm.machine)/$(HB.name)-gui-$(HB.version)*.rpm $(PKG.gui.rpm)
diff --git a/test/module.defs b/test/module.defs
index 48f0c57ba..947bc1591 100644
--- a/test/module.defs
+++ b/test/module.defs
@@ -14,7 +14,7 @@ TEST.libs = $(LIBHB.a) $(foreach n, \
ogg samplerate swscale theora vorbis vorbisenc x264, \
$(CONTRIB.build/)lib/lib$(n).a )
-TEST.install.exe = $(PREFIX/)bin/$(notdir $(TEST.exe))
+TEST.install.exe = $(DESTDIR)$(PREFIX/)bin/$(notdir $(TEST.exe))
ifeq (1,$(LIBICONV.enabled))
TEST.libs += $(CONTRIB.build/)lib/libiconv.a