]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
Allow different .dsc files for Debian and Ubuntu 282/head
authorStefan Hundhammer <shundhammer@suse.de>
Thu, 13 Oct 2016 13:28:37 +0000 (15:28 +0200)
committerStefan Hundhammer <shundhammer@suse.de>
Thu, 13 Oct 2016 14:01:51 +0000 (16:01 +0200)
Makefile.am
configure.ac
debian/.gitignore [new file with mode: 0644]
debian/snapper-Debian.dsc.in.in [moved from debian/snapper.dsc.in with 78% similarity]
debian/snapper-xUbuntu.dsc.in.in [new file with mode: 0644]

index 11c8f8336296efcb7db78133ba4c04d8faaa4289..f69c43b2843c3a8659ead07804234e08914ca117 100644 (file)
@@ -15,7 +15,9 @@ snapper-$(VERSION).tar.bz2: dist-bzip2
 
 DEBIAN_FLAVOURS =      \
     Debian_7.0         \
-    Debian_8.0         \
+    Debian_8.0
+
+UBUNTU_FLAVOURS =      \
     xUbuntu_14.04      \
     xUbuntu_14.10      \
     xUbuntu_15.04      \
@@ -25,36 +27,42 @@ DEBIAN_FLAVOURS =   \
 show-debian:
        @echo "Debian flavors: $(DEBIAN_FLAVOURS)"
 
+show-ubuntu:
+       @echo "Ubuntu flavors: $(UBUNTU_FLAVOURS)"
+
 package-clean:
        rm -f package/snapper-*.tar.bz2
        rm -f package/debian.*
-       rm -f package/*.dsc
+       rm -f package/*.dsc*
 
 # Create all the files necessary for building the package with OBS:
 #
 # - Clean up the package/ directory
 # - create a new tarball (via the depencency)
 # - copy the content of the debian/ directory
-# - generate a master .dsc file with the "Files:" line for the tarball
-#   with its md5sum, file size in bytes, and name
-# - copy that .dsc master file for each flavor of Debian to be supported
-# - remove the .dsc master file and the .dsc.in file
+# - for both Debian and Ubuntu, generate a master .dsc.in from file with the
+#   "Files:" line for the tarball with its md5sum, file size in bytes, and name
+# - copy that .dsc.in master file for each flavor of Debian or Ubuntu to be supported
+# - remove the .dsc.in master file and the .dsc.in.in file
 # - move the new tarball to the package/ directory
 #
 # Unfortunately, using variables for the md5sum and the file size didn't work out
 # (not even with the GNU make ':=' syntax): They cannot be assigned in the 'actions'
 # part of a rule, only outside rules.
 #
-# The debian/snapper.dsc file is generated by autoconf (see configure.ac) from
-# debian/snapper.dsc.in with @VERSION@ expanded with the content of
-# $toplevel/VERSION.
+# The .dsc files are generated from a .dsc.in file for each Debian and Ubuntu,
+# which in turn are generated by configure/autoconf from .dsc.in.in files (see
+# configure.ac) where @VERSION@ is expanded with the content of the toplevel
+# VERSION file.
 #
 # $< is the first depencency of the rule, i.e. snapper-$(VERSION).tar.gz in this case.
 #
 package: snapper-$(VERSION).tar.bz2 package-clean
        cp debian/* package/
-       echo "$(shell md5sum $< | sed -e 's/\s.*//') $(shell wc -c $<)" >>package/snapper.dsc
-       for DEB in $(DEBIAN_FLAVOURS); do cp -v package/snapper.dsc package/snapper-$${DEB}.dsc; done
-       rm package/snapper.dsc*
+       echo "$(shell md5sum $< | sed -e 's/\s.*//') $(shell wc -c $<)" >>package/snapper-Debian.dsc.in
+       echo "$(shell md5sum $< | sed -e 's/\s.*//') $(shell wc -c $<)" >>package/snapper-xUbuntu.dsc.in
+       for FLAV in $(DEBIAN_FLAVOURS); do cp -v package/snapper-Debian.dsc.in  package/snapper-$${FLAV}.dsc; done
+       for FLAV in $(UBUNTU_FLAVOURS); do cp -v package/snapper-xUbuntu.dsc.in package/snapper-$${FLAV}.dsc; done
+       rm package/snapper*.dsc.in*
        mv snapper-$(VERSION).tar.bz2 package/
 
index 33ce6eb33214950d3f4cc595ad6249627d3c2803..f8199b06f77249dc46ab5bd07d9c5aeec84e8697 100644 (file)
@@ -183,5 +183,6 @@ AC_OUTPUT(
        testsuite-real/Makefile
        testsuite-cmp/Makefile
        package/snapper.spec:snapper.spec.in
-        debian/snapper.dsc:debian/snapper.dsc.in
+        debian/snapper-Debian.dsc.in:debian/snapper-Debian.dsc.in.in
+        debian/snapper-xUbuntu.dsc.in:debian/snapper-xUbuntu.dsc.in.in
 )
diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644 (file)
index 0000000..4a1b807
--- /dev/null
@@ -0,0 +1,2 @@
+snapper*.dsc.in
+
similarity index 78%
rename from debian/snapper.dsc.in
rename to debian/snapper-Debian.dsc.in.in
index 0ffc23c0d901b551d0dfdad6e348d45364d90167..8e01f55023ef565755e0049045d38e7dde7c800b 100644 (file)
@@ -6,8 +6,8 @@ Maintainer: Arvin Schnell <aschnell@suse.com>
 Architecture: any
 Build-Depends: debhelper (>= 4.1.16), acl-dev, g++, libboost-dev, libboost-thread-dev, libboost-system-dev, libboost-test-dev, libxml2-dev, libz-dev, libdbus-1-dev, libpam-dev, xsltproc, docbook-xsl, locales-all
 #
-# The 'Files' line is generated during 'make debian-package':
+# The 'Files' line is generated during 'make package':
 # Files:
 #  423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz
-#        md5sum                     size   filename
+#
 Files:
diff --git a/debian/snapper-xUbuntu.dsc.in.in b/debian/snapper-xUbuntu.dsc.in.in
new file mode 100644 (file)
index 0000000..401b4f0
--- /dev/null
@@ -0,0 +1,13 @@
+Format: 1.0
+Source: snapper
+Version: @VERSION@
+Binary: snapper
+Maintainer: Arvin Schnell <aschnell@suse.com>
+Architecture: any
+Build-Depends: debhelper (>= 4.1.16), acl-dev, g++, libboost-dev, libboost-thread-dev, libboost-system-dev, libboost-test-dev, libxml2-dev, libz-dev, libdbus-1-dev, libpam-dev, xsltproc, docbook-xsl, language-pack-en, language-pack-de
+#
+# The 'Files' line is generated during 'make package':
+# Files:
+#  423a20ae6e882d44e65a4eff97f2269f 630905 snapper-0.2.8.tar.gz
+#
+Files: