Kaynağa Gözat

allow vendors to install configuration files

Vendors like ubuntu need to change some options, so giving them
a way to do this less painfully avoids reducing differences.
David Kalnischkies 12 yıl önce
ebeveyn
işleme
c1b3d18934
3 değiştirilmiş dosya ile 8 ekleme ve 7 silme
  1. 2 7
      debian/rules
  2. 6 0
      vendor/README
  3. 0 0
      vendor/ubuntu/apt.conf-01-vendor-ubuntu

+ 2 - 7
debian/rules

@@ -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

+ 6 - 0
vendor/README

@@ -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.

debian/apt.conf.Ubuntu → vendor/ubuntu/apt.conf-01-vendor-ubuntu