]> git.saurik.com Git - apt.git/commitdiff
allow vendors to install configuration files
authorDavid Kalnischkies <david@kalnischkies.de>
Sat, 26 Apr 2014 11:31:41 +0000 (13:31 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Sat, 26 Apr 2014 11:46:23 +0000 (13:46 +0200)
Vendors like ubuntu need to change some options, so giving them
a way to do this less painfully avoids reducing differences.

debian/apt.conf.Ubuntu [deleted file]
debian/rules
vendor/README
vendor/ubuntu/apt.conf-01-vendor-ubuntu [new file with mode: 0644]

diff --git a/debian/apt.conf.Ubuntu b/debian/apt.conf.Ubuntu
deleted file mode 100644 (file)
index c4092ff..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-// Server information for apt-changelog
-APT {
-  Changelogs {
-    Server "http://changelogs.ubuntu.com/changelogs";
-  };
-};
index 300c0f756085f41ec5984b3316a7e1e473bc38a5..fc0e9e8f6bb8c16656620191f7e1ef765b3b5a58 100755 (executable)
@@ -56,9 +56,6 @@ endif
 # APT Programs in apt-utils
 APT_UTILS=ftparchive sortpkgs extracttemplates
 
-# get distro
-APT_VENDOR_CONF := $(shell lsb_release -i -s)
-
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
@@ -194,10 +191,8 @@ apt: build-binary build-manpages debian/apt.install
        chmod 755 debian/$@/etc/kernel/postinst.d/apt-auto-removal
        # install bash completion
        cp share/bash-completions/* debian/$@/usr/share/bash-completion/completions/
-       # install distro specific apt conf
-       if [ -e debian/apt.conf.${APT_VENDOR_CONF} ]; then \
-               cp debian/apt.conf.${APT_VENDOR_CONF} debian/$@/etc/apt/apt.conf.d/01-vendor-${APT_VENDOR_CONF}; \
-       fi
+       # install vendor specific apt confs
+       find -L vendor/current -name 'apt.conf-*' | while read conf; do cp "$${conf}" "debian/$@/etc/apt/apt.conf.d/$${conf#*-}"; done
 
        # make rosetta happy and remove pot files in po/ (but leave stuff
        # in po/domains/* untouched) and cp *.po into each domain dir
index 19cda6236c72c668f49c998099ccb0137f2a1d98..c2fabbd4c5387e38e99063788880c679758098ad 100644 (file)
@@ -58,3 +58,9 @@ You can use some placeholders in this file, namely:
 with the value you would expect based on the name.
 
 The placeholder &current-codename; is yours and can be set in apt-vendor.ent
+
+
+== apt.conf-*
+
+Files in your vendor directory following this naming scheme will be picked up
+by the debian/rules file and installed in /etc/apt/apt.conf.d/ directory.
diff --git a/vendor/ubuntu/apt.conf-01-vendor-ubuntu b/vendor/ubuntu/apt.conf-01-vendor-ubuntu
new file mode 100644 (file)
index 0000000..c4092ff
--- /dev/null
@@ -0,0 +1,6 @@
+// Server information for apt-changelog
+APT {
+  Changelogs {
+    Server "http://changelogs.ubuntu.com/changelogs";
+  };
+};