[SCM] mediatomb/master: Simplify the rules file.

micove-guest at users.alioth.debian.org micove-guest at users.alioth.debian.org
Sun Mar 25 05:45:22 UTC 2012


The following commit has been merged in the master branch:
commit 0885015fc42421489f4935811009230e6b0c8fc9
Author: Miguel Colon <debian.micove at gmail.com>
Date:   Sat Mar 24 22:06:59 2012 -0400

    Simplify the rules file.
    
    - debhelper does all of this by default.
    - Move the information from dh_auto_install to *.install or *.dirs
    - Rename config.xml.dist to config.xml to be able to copy with dh_install

diff --git a/debian/config.xml.dist b/debian/config.xml
similarity index 100%
rename from debian/config.xml.dist
rename to debian/config.xml
diff --git a/debian/mediatomb-daemon.dirs b/debian/mediatomb-daemon.dirs
new file mode 100644
index 0000000..90e7775
--- /dev/null
+++ b/debian/mediatomb-daemon.dirs
@@ -0,0 +1 @@
+var/lib/mediatomb
diff --git a/debian/mediatomb-daemon.install b/debian/mediatomb-daemon.install
index 1f622f7..859ec55 100644
--- a/debian/mediatomb-daemon.install
+++ b/debian/mediatomb-daemon.install
@@ -1,2 +1 @@
-etc/mediatomb/config.xml
-var/lib/mediatomb
+debian/config.xml etc/mediatomb/
diff --git a/debian/mediatomb.install b/debian/mediatomb.install
index d5a5227..2fa8db4 100644
--- a/debian/mediatomb.install
+++ b/debian/mediatomb.install
@@ -1,2 +1,2 @@
-usr/share/pixmaps/mediatomb.xpm
-usr/share/applications/mediatomb.desktop
+artwork/mediatomb.xpm usr/share/pixmaps/
+debian/mediatomb.desktop usr/share/applications/
diff --git a/debian/rules b/debian/rules
index d8f0894..625575e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,38 +4,12 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-# These are from the autotools-dev package documentation.
-# /usr/share/doc/autotools-dev/README.Debian.gz
-# from the section titled "Calling GNU configure properly"
-export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-
-# FOR AUTOCONF 2.52 AND NEWER ONLY
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
-  confflags += --build $(DEB_HOST_GNU_TYPE)
-else
-  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
-endif
-
-# CFLAGS, CXXFLAGS, and LDFLAGS to use. Allowing them to be overridden.
-DEFAULT_CFLAGS = -Wall -g
-DEFAULT_CXXFLAGS = -Wall -g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-   DEFAULT_CFLAGS += -O0
-   DEFAULT_CXXFLAGS += -O0
-else
-   DEFAULT_CFLAGS += -O2
-   DEFAULT_CXXFLAGS += -O2
-endif
 ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
     MEDIATOMB_DEBUG_OPTIONS += --enable-debug-malloc0 \
 			--enable-tombdebug \
 			--enable-upnpdebug \
 			--enable-debug-log
 endif
-DEB_CFLAGS ?= $(DEFAULT_CFLAGS)
-DEB_CXXFLAGS ?= $(DEFAULT_CXXFLAGS)
-DEB_LDFLAGS ?= -Wl,-z,defs
 
 # Implement a MEDIATOMB_CONFIG_OPTIONS variable that sets the default configure
 # options and allow it to be overridden.
@@ -45,11 +19,7 @@ export DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
 ifeq (linux,$(DEB_HOST_ARCH_OS))
    ENABLE_INOTIFY = --enable-inotify
 endif
-MEDIATOMB_CONFIG_OPTIONS ?= $(confflags) \
-			--prefix=/usr \
-			--mandir=\$${prefix}/share/man \
-			--infodir=\$${prefix}/share/info \
-			--enable-sqlite3 \
+MEDIATOMB_CONFIG_OPTIONS ?= --enable-sqlite3 \
 			--enable-mysql \
 			--enable-libjs \
 			--enable-libmagic \
@@ -70,36 +40,10 @@ MEDIATOMB_CONFIG_OPTIONS ?= $(confflags) \
 			--disable-libmp4v2 \
 			--disable-libextractor \
 			--disable-lastfmlib \
-			$(MEDIATOMB_DEBUG_OPTIONS) \
-			CFLAGS="$(DEB_CFLAGS)" \
-			CXXFLAGS="$(DEB_CXXFLAGS)" \
-			LDFLAGS="$(DEB_LDFLAGS)"
-
-$(info DEB_BUILD_OPTIONS = $(DEB_BUILD_OPTIONS))
-
-%:
-	dh $@ --with autoreconf
+			$(MEDIATOMB_DEBUG_OPTIONS)
 
 override_dh_auto_configure:
-	chmod a+x configure configure_aux/*
-	./configure $(MEDIATOMB_CONFIG_OPTIONS)
-
-override_dh_auto_install:
-	dh_auto_install
-	install -m 0755 -d $(CURDIR)/debian/tmp/var/lib/mediatomb
-	install -D -m 0644 debian/config.xml.dist \
-		$(CURDIR)/debian/tmp/etc/mediatomb/config.xml
-	install -D -m 0644 artwork/mediatomb.xpm \
-		$(CURDIR)/debian/tmp/usr/share/pixmaps/mediatomb.xpm
-	install -D -m 0644 debian/mediatomb.desktop \
-		$(CURDIR)/debian/tmp/usr/share/applications/mediatomb.desktop
-	$(RM) -f $(CURDIR)/debian/tmp/usr/share/mediatomb/web/js/prototype.js
-
-override_dh_install:
-	dh_install --sourcedir=debian/tmp
-
-override_dh_installchangelogs:
-	dh_installchangelogs ChangeLog
+	dh_auto_configure -- $(MEDIATOMB_CONFIG_OPTIONS)
 
 override_dh_installinit:
 	dh_installinit --name=mediatomb \
@@ -114,3 +58,6 @@ override_dh_strip:
 get-orig-source:
 # Use external script
 	$(dir $_)mediatomb-get-orig-source
+
+%:
+	dh $@ --with autoreconf

-- 
MediaTomb packaging



More information about the pkg-multimedia-commits mailing list