Commit bed3d74f authored by Urs Fleisch's avatar Urs Fleisch
Browse files

use one debian directory instead of three ("deb-kde3", "deb-kde4", "deb-qt")...

use one debian directory instead of three ("deb-kde3", "deb-kde4", "deb-qt") for all binary packages
parent d0c55608
......@@ -4,17 +4,25 @@ kid3 (1.1-0) unstable; urgency=low
-- Urs Fleisch <ufleisch@users.sourceforge.net> Sat, 27 Sep 2008 15:51:35 +0200
kid3 (1.0-0) unstable; urgency=low
kid3 (1.0-1) unstable; urgency=low
* New upstream release.
* New upstream release:
- Includes polish translation. (Closes: #465675)
* Add build-depend on libqt3-i18n to build translations.
* Update description in control file and manpages.
-- Urs Fleisch <ufleisch@users.sourceforge.net> Sat, 01 Mar 2008 15:44:56 +0100
-- Ana Beatriz Guerrero Lopez <ana@debian.org> Tue, 08 Apr 2008 10:32:37 +0200
kid3 (0.10-0) unstable; urgency=low
kid3 (0.10-1) unstable; urgency=low
* New upstream release. (Closes: #447699)
* New upstream release:
- Allow configuration of default charset for new tags. (Closes: #447699)
* Remove all the patches added in the 0.9-X uploads.
* Move Homepage into control field.
* Update Standards-Version to 3.7.3
* Add Vcs-Svn and Vcs-Browser fields.
-- Urs Fleisch <ufleisch@users.sourceforge.net> Thu, 15 Nov 2007 21:38:58 +0100
-- Ana Beatriz Guerrero Lopez <ana@debian.org> Wed, 05 Dec 2007 00:18:59 +0100
kid3 (0.9-4) unstable; urgency=low
......
......@@ -3,8 +3,15 @@ Section: kde
Priority: optional
Maintainer: Debian KDE Extras Team <pkg-kde-extras@lists.alioth.debian.org>
Uploaders: Ana Beatriz Guerrero Lopez <ana@debian.org>, Mark Purcell <msp@debian.org>
Build-Depends: debhelper (>= 5), libqt3-mt-dev (>> 3.0), libqt3-i18n, kdelibs4-dev (>> 3.0), libid3-3.8.3-dev, libtunepimp-dev | libtunepimp3-dev, libvorbis-dev, libflac++-dev, libtag1-dev, quilt
Standards-Version: 3.7.2
Build-Depends: debhelper (>= 5), quilt,
libid3-3.8.3-dev, libtunepimp-dev | libtunepimp3-dev, libflac++-dev, libvorbis-dev, libtag1-dev,
libqt3-mt-dev (>> 3.0), kdelibs4-dev (>> 3.0),
xsltproc, docbook-xsl, libqt3-i18n,
cmake, kdelibs5-dev (>=4:3.96.0)
Standards-Version: 3.7.3
Homepage: http://kid3.sourceforge.net/
Vcs-Svn: svn://svn.debian.org/pkg-kde/kde-extras/kid3/trunk/
Vcs-Browser: http://svn.debian.org/wsvn/pkg-kde/kde-extras/kid3/?op=log
Package: kid3
Architecture: any
......@@ -26,8 +33,50 @@ Description: KDE MP3 ID3 tag editor
* Import and export album data
* Import from gnudb.org, TrackType.org, MusicBrainz, Discogs
.
This package uses KDE libraries, if you do not use KDE you should use kid3-qt.
.
Author: Urs Fleisch <ufleisch@users.sourceforge.net>
Homepage: http://kid3.sourceforge.net/
This package uses KDE 3 libraries, if you do not use KDE 3 you should use kid3-qt or kid3-kde4.
Package: kid3-qt
Section: sound
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Audio tag editor
With Kid3, an audio tag editor you can:
* Edit ID3v1.1 tags in your MP3 files
* Edit all ID3v2.3 and ID3v2.4 frames in your MP3 files
* Convert between ID3v1.1, ID3v2.3 and ID3v2.4 tags
* Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Speex,
TrueAudio and WavPack files.
* Edit tags of multiple files, e.g. the artist, album, year and genre
of all files of an album typically have the same values and can be
set together
* Generate tags from filenames
* Generate filenames from tags
* Generate playlist files
* Automatic case conversion and string translation
* Import and export album data
* Import from gnudb.org, TrackType.org, MusicBrainz, Discogs
.
This package does not use KDE libraries, if you use KDE you should use kid3.
Package: kid3-kde4
Section: kde
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: KDE audio tag editor
With Kid3, an ID3 tag editor for KDE you can:
* Edit ID3v1.1 tags in your MP3 files
* Edit all ID3v2.3 and ID3v2.4 frames in your MP3 files
* Convert between ID3v1.1, ID3v2.3 and ID3v2.4 tags
* Edit tags in MP3, Ogg/Vorbis, FLAC, MPC, MP4/AAC, MP2, Speex,
TrueAudio and WavPack files.
* Edit tags of multiple files, e.g. the artist, album, year and genre
of all files of an album typically have the same values and can be
set together
* Generate tags from filenames
* Generate filenames from tags
* Generate playlist files
* Automatic case conversion and string translation
* Import and export album data
* Import from gnudb.org, TrackType.org, MusicBrainz, Discogs
.
This package uses KDE 4 libraries, if you use KDE 3 you should use kid3.
include /usr/share/cdbs/1/class/cmake.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk
include /usr/share/cdbs/1/rules/utils.mk
#!/usr/bin/make -f
# For Ubuntu <=8.04 use this:
#DEB_CMAKE_PREFIX = /usr/lib/kde4
#DEB_CONFIG_INSTALL_DIR = $(DEB_CMAKE_PREFIX)/etc/kde4
# For Ubuntu >=8.10, Debian use this:
DEB_CMAKE_PREFIX ?= /usr
DEB_CONFIG_INSTALL_DIR ?= /usr/share/kde4/config
DEB_COMPRESS_EXCLUDE = .dcl .docbook -license .tag .sty .el
DEB_CMAKE_EXTRA_FLAGS += \
-DCMAKE_BUILD_TYPE=Debian \
$(KDE4-ENABLE-FINAL) \
-DKDE4_BUILD_TESTS=false \
-DKDE_DISTRIBUTION_TEXT="Kubuntu packages" \
-DKDE_DISTRIBUTION_TEXT="Debian packages" \
-DCMAKE_SKIP_RPATH=true \
-DKDE4_USE_ALWAYS_FULL_RPATH=false \
-DCONFIG_INSTALL_DIR=$(DEB_CONFIG_INSTALL_DIR) \
-DDATA_INSTALL_DIR=/usr/share/kde4/apps \
-DHTML_INSTALL_DIR=/usr/share/doc/kde4/HTML \
-DKCFG_INSTALL_DIR=/usr/share/kde4/config.kcfg \
-DLIB_INSTALL_DIR=/usr/lib \
-DDATA_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/share/kde4/apps \
-DHTML_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/share/doc/kde4/HTML \
-DKCFG_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/share/kde4/config.kcfg \
-DLIB_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/lib \
-DSYSCONF_INSTALL_DIR=/etc
# Set the one below to something else than 'yes' to disable linking
......@@ -37,12 +38,7 @@ else
DEB_KDE_LINK_WITH_AS_NEEDED := no
endif
#DEB_CMAKE_PREFIX = /usr/lib/kde4
DEB_DH_INSTALL_SOURCEDIR = debian/tmp
#DEB_DH_SHLIBDEPS_ARGS = -l/usr/lib/kde4/lib/
DEB_KDE_ENABLE_FINAL ?=
#DEB_MAKE_ENVVARS += XDG_CONFIG_DIRS=/etc/xdg XDG_DATA_DIRS=/usr/share
#DEB_STRIP_EXCLUDE = so
ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
cdbs_treat_me_gently_arches := arm m68k alpha ppc64 armel armeb
......@@ -53,56 +49,26 @@ ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
endif
endif
common-build-arch:: debian/stamp-man-pages
debian/stamp-man-pages:
if ! test -d debian/man/out; then mkdir -p debian/man/out; fi
for f in $$(find debian/man -name '*.sgml'); do \
docbook-to-man $$f > debian/man/out/`basename $$f .sgml`.1; \
done
for f in $$(find debian/man -name '*.man'); do \
soelim -I debian/man $$f \
> debian/man/out/`basename $$f .man`.`head -n1 $$f | awk '{print $$NF}'`; \
done
touch debian/stamp-man-pages
CMAKE = cmake
DEB_CMAKE_INSTALL_PREFIX = $(DEB_CMAKE_PREFIX)
DEB_CMAKE_NORMAL_ARGS = -DCMAKE_INSTALL_PREFIX="$(DEB_CMAKE_INSTALL_PREFIX)" -DCMAKE_C_COMPILER:FILEPATH="$(CC)" -DCMAKE_CXX_COMPILER:FILEPATH="$(CXX)" -DCMAKE_C_FLAGS="$(CFLAGS)" -DCMAKE_CXX_FLAGS="$(CXXFLAGS)" -DCMAKE_SKIP_RPATH=ON -DCMAKE_VERBOSE_MAKEFILE=ON
clean::
ifndef THIS_SHOULD_GO_TO_UNSTABLE
#guard against experimental uploads to unstable
#dpkg-parsechangelog | grep ^Distribution | grep -q 'experimental\|UNRELEASED'
endif
rm -rf debian/man/out
-rmdir debian/man
rm -f debian/stamp-man-pages
rm -f CMakeCache.txt
build: kid3-kde4.build-stamp
kid3-kde4.build-stamp:
mkdir kid3-kde4; \
cd kid3-kde4; \
$(CMAKE) .. $(DEB_CMAKE_NORMAL_ARGS) $(DEB_CMAKE_EXTRA_FLAGS)
cd ..
$(MAKE) -C kid3-kde4
$(patsubst %,binary-install/%,$(DEB_PACKAGES)) :: binary-install/%:
if test -x /usr/bin/dh_desktop; then dh_desktop -p$(cdbs_curpkg) $(DEB_DH_DESKTOP_ARGS); fi
if test -e debian/$(cdbs_curpkg).lintian; then \
install -p -D -m644 debian/$(cdbs_curpkg).lintian \
debian/$(cdbs_curpkg)/usr/share/lintian/overrides/$(cdbs_curpkg); \
fi
if test -e debian/$(cdbs_curpkg).presubj; then \
install -p -D -m644 debian/$(cdbs_curpkg).presubj \
debian/$(cdbs_curpkg)/usr/share/bug/$(cdbs_curpkg)/presubj; \
fi
touch kid3-kde4.build-stamp
binary-install/$(DEB_SOURCE_PACKAGE)-doc-html::
set -e; \
for doc in `cd $(DEB_DESTDIR)/usr/share/doc/kde/HTML/en; find . -name index.docbook`; do \
pkg=$${doc%/index.docbook}; pkg=$${pkg#./}; \
echo Building $$pkg HTML docs...; \
mkdir -p $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
cd $(CURDIR)/debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
meinproc4 $(DEB_DESTDIR)/usr/share/doc/kde/HTML/en/$$pkg/index.docbook; \
done
for pkg in $(DOC_HTML_PRUNE) ; do \
rm -rf debian/$(DEB_SOURCE_PACKAGE)-doc-html/usr/share/doc/kde/HTML/en/$$pkg; \
done
clean:
[ ! -f kid3-kde4/Makefile ] || $(MAKE) -C kid3-kde4 clean
-rm -rf kid3-kde4.build-stamp kid3-kde4
install: build
$(MAKE) -C kid3-kde4 install DESTDIR=$(CURDIR)/debian/kid3-kde4
# Process "sameVersionDep:" substvars
DH_SAMEVERSIONDEPS=debian/cdbs/dh_sameversiondeps
common-binary-predeb-arch common-binary-predeb-indep::
@if [ ! -x "$(DH_SAMEVERSIONDEPS)" ]; then chmod a+x "$(DH_SAMEVERSIONDEPS)"; fi
$(DH_SAMEVERSIONDEPS)
.PHONY: build clean install
#!/usr/bin/make -f
QMAKE = qmake-qt3
DEB_CONFIGURE_PREFIX = /usr
build: kid3-qt.build-stamp
kid3-qt/configure: kid3-qt/configure.in
cd kid3-qt && autoconf
kid3-qt.build-stamp: kid3-qt/configure
cd kid3-qt; \
./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
--prefix=$(DEB_CONFIGURE_PREFIX) --with-qmake=$(QMAKE); \
cd ..
$(MAKE) -C kid3-qt
touch kid3-qt.build-stamp
clean:
[ ! -f kid3-qt/Makefile ] || $(MAKE) -C kid3-qt distclean
-rm -rf kid3-qt.build-stamp kid3-qt/kid3 kid3-qt/doc kid3-qt/po
install: build
$(MAKE) -C kid3-qt install INSTALL_ROOT=$(CURDIR)/debian/kid3-qt
.PHONY: build clean install
#!/usr/bin/make -f
pixmaps = $(CURDIR)/debian/kid3/usr/share/pixmaps
bindir = $(CURDIR)/debian/kid3/usr/bin
kdedocs = $(CURDIR)/debian/kid3/usr/share/doc/kde/HTML
build: kid3.build-stamp
-include debian/debiandirs
debian/debiandirs: admin/debianrules
perl -w admin/debianrules echodirs > debian/debiandirs
configure: Makefile.cvs
$(MAKE) -f Makefile.cvs
kid3.build-stamp: configure
QTDIR=/usr/share/qt3 ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
$(configkde)
$(MAKE)
touch kid3.build-stamp
clean:
[ ! -f Makefile ] || $(MAKE) distclean
-rm -f kid3.build-stamp po/*.gmo
install: build
# Main install.
$(MAKE) install DESTDIR=$(CURDIR)/debian/kid3
# Make common links for docs.
for i in `find $(kdedocs) -type d -name kid3 -not -regex .*/en/kid3`; do \
ln -f -n -s ../../en/common $$i/common; done; done
perl -w admin/debianrules cleanup
.PHONY: build clean install
......@@ -3,9 +3,9 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
pixmaps = $(CURDIR)/debian/kid3/usr/share/pixmaps
bindir = $(CURDIR)/debian/kid3/usr/bin
kdedocs = $(CURDIR)/debian/kid3/usr/share/doc/kde/HTML
# By default, all binary packages listed in debian/control are build.
# To build only a subset of the packages, set the variable DH_OPTIONS, e.g.
# DH_OPTIONS="-p kid3-qt"
INSTALL_DIR = install -p -d -o root -g root -m 755
INSTALL_FILE = install -p -o root -g root -m 644
......@@ -32,30 +32,23 @@ endif
build: build-stamp
-include debian/debiandirs
debian/debiandirs: admin/debianrules
perl -w admin/debianrules echodirs > debian/debiandirs
build-stamp:
dh_testdir
$(MAKE) -f /usr/share/quilt/quilt.make patch
QTDIR=/usr/share/qt3 ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
$(configkde)
$(MAKE)
for p in `dh_listpackages`; do $(MAKE) -f debian/$$p.mk build; done
touch build-stamp
clean:
dh_testdir
dh_testroot
[ ! -f Makefile ] || $(MAKE) distclean
for p in `dh_listpackages`; do $(MAKE) -f debian/$$p.mk clean; done
$(MAKE) -f /usr/share/quilt/quilt.make unpatch
-rm -f *-stamp po/*.gmo
-rm -f *-stamp
dh_clean
install: build
......@@ -64,16 +57,8 @@ install: build
dh_clean -k
dh_installdirs
# Main install.
$(MAKE) install DESTDIR=$(CURDIR)/debian/kid3
# Make common links for docs.
for p in `dh_listpackages`; do \
for i in `find $(kdedocs) -type d -name $$p -not -regex .*/en/$$p`; do \
ln -f -n -s ../../en/common $$i/common; done; done
for p in `dh_listpackages`; do $(MAKE) -f debian/$$p.mk install; done
perl -w admin/debianrules cleanup
binary-indep: build install
binary-arch: build install
......@@ -96,7 +81,7 @@ binary-arch: build install
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
.PHONY: build clean binary-indep binary-arch binary install
get-orig-source:
@@dh_testdir
......
Debian kde-extras Team
----------------------
1. Contacts
-----------
General help requests
<debian-kde@lists.debian.org> mailing list
#debian-kde on irc
Packaging queries
<debian-qt-kde@lists.debian.org> mailing list
#debian-qt-kde on irc
Maintainers
<pkg-kde-extras@lists.alioth.debian.org> mailing list
2. Subversion repository
------------------------
You can browse it only at:
http://svn.debian.org/wsvn/pkg-kde/kde-extras/
To "checkout" the repository use these commands:
$ svn co svn+ssh://${ALIOTH_USERNAME}@svn.debian.org/svn/pkg-kde/kde-extras
Authorized SSH keys are controlled at https://alioth.debian.org/account/
The repository layout is:
- packagename/
    - trunk/
    - branches/
    - tags/
        - 0.7.2-1/
        - 0.7.2-2/
        - 0.7.2-2ubuntu1/
        - 0.7.2-2ubuntu2/
        - 0.7.2-2ubuntu3/
        - 0.8.0/
        ...
If only one version of the package is available at the time, development must
be made at trunk/ dir, copying the dir to tags/'pkg-version' each time a new
release is made.
When, at some point, the need to have two different versions at the same time
arises (for example, if we need a version to be in unstable and a different one
to be in experimental), experimental development will be made in trunk/ and
if a new unstable package needs to be cooked, copying
tag/'latest_version_in_sid' to tag/'latest_version_in_sid'+1 will make the
trick.
3. Using svn-buildpackage
--------------------------
Packages with an upstream tarball will require you to set the mergeWithUpstream
property first (from the package root) so that svn-buildpackage will look for
the .orig.tar.gz in the ../tarballs directory.
% svn propset mergeWithUpstream 1 debian
Please note that this only works for packages which have only the debian/
directory committed. Consequently, you must use CDBS's simple-patchsys.mk or
dpatch to modify the upstream sources.
After you have finished and committed your Debian patches via
% svn commit [PACKAGE]
as well as copying the orig.tar.gz to ../tarballs/ if necessary, you may build
your package with the following commands:
% svn-buildpackage --svn-ignore-new -rfakeroot
Please, don't commit tarballs/ or build-area/ directories to SVN.
4. Tarballs and Build-area directories
------------------------------------
During pkg development before uploaded to debian the tarballs can be found at:
http://pkg-kde.alioth.debian.org/kde-extra/orig.tar.gz/
You need to place those dirs in the parent directory of the one from which you're
running svn-buildpackage. Usually this means placing tarballs/ and build-area/ dirs
in 'pkgname'/ dir, at the same level as trunk/
If you want to compile inside one version in tags/ dir, you'll need to place those
dirs inside that dir. Of course the easiest and cleanest way of doing it is
by making a symlink of those dirs inside tags/ dir.
5. Using svn-inject
-------------------
To inject a new package into the Debian KDE Extras svn archive you should use svn-inject(1)
as follows:
svn-inject -o <package>.dsc svn+ssh://${ALIOTH_USERNAME}@svn.debian.org/svn/pkg-kde/kde-extras
Type in your alioth password a few hundred times :-) and your package should be
uploaded to the archive. Note you will also need to manually copy the
package.orig.tar.gz to your tarballs directory. The -o option is important as
this ensures that we 'Only keep modified files under SVN control'
include debian/cdbs/versions.mk
debian/control: debian/control.tmp
mv debian/control.tmp debian/control
debian/control.tmp: update-versions
update-versions: debian/control.in
sed "s/CDBS_MIN_VER/$(CDBS_MIN_VER)/;\
s/QUILT_MIN_VER/$(QUILT_MIN_VER)/;\
s/CMAKE_MIN_VER/$(CMAKE_MIN_VER)/;\
s/KDELIBS_VERSION/$(KDELIBS_VERSION)/;\
s/KDELIBS_UPSTREAM_VERSION/$(KDELIBS_UPSTREAM_VERSION)/;\
s/KDELIBS_SOURCE_VERSION/$(KDELIBS_SOURCE_VERSION)/;\
s/KDEPIMLIBS_VERSION/$(KDEPIMLIBS_VERSION)/;\
s/KDEPIMLIBS_SOURCE_VERSION/$(KDEPIMLIBS_SOURCE_VERSION)/;\
s/KDEPIMLIBS_UPSTREAM_VERSION/$(KDEPIMLIBS_UPSTREAM_VERSION)/;\
" debian/control.in > debian/control.tmp
.PHONY: update-versions
#!/usr/bin/perl -w
use strict;
use Dpkg::Control;
use Dpkg::Substvars;
use Dpkg::ErrorHandling;
use File::Copy;
use Debian::Debhelper::Dh_Lib;
my $namespace = "sameVersionDep";
my @fields = qw(Depends Recommends Suggests Enhances Pre-Depends);
my $re_fields = join("|", @fields);
my $re_pkgname = qr/[a-z0-9][a-z0-9+.-]*/;
my $re_oursubstvar = qr/\$\{($namespace:($re_pkgname):($re_pkgname)-($re_fields)-($re_pkgname))\}/;
# Global substvars file
my $g_substvars = new Dpkg::Substvars;
$g_substvars->parse("debian/substvars") if (-r "debian/substvars");
sub Shlibsvars::new {
my ($cls, $package, $control, $substvars_file) = @_;
my $self = bless ( {
"package" => $package,
"control" => $control,
"file" => $substvars_file,
}, $cls);
$self->{substvars} = new Dpkg::Substvars;
if (-r $self->{file}) {
$self->{substvars}->parse($self->{file});
}
return $self;
}
sub Shlibsvars::get_fieldval {
my ($self, $field) = @_;
my $pkg = $self->{control}->get_pkg_by_name($self->{package});
return undef if (!defined $pkg || !exists $pkg->{$field});
# Turn of warnings for substvars runs
my $save_quiet = $Dpkg::ErrorHandling::quiet_warnings;
$Dpkg::ErrorHandling::quiet_warnings = 1;
my $val = $pkg->{$field};
$val = $self->{substvars}->substvars($val);
$val = $g_substvars->substvars($val);
$Dpkg::ErrorHandling::quiet_warnings = $save_quiet;
return $val;
}
sub Shlibsvars::extract_deps {
my ($self, $field, $deppkg) = @_;
my $val = $self->get_fieldval($field);
return undef() unless defined $val;
# Extract dependency fields we need
my @matched_deps;
for my $dep (split(/\s*,\s*/, $val)) {
if ($dep =~ /^\Q$deppkg\E(?:$|[\W])/) {
push @matched_deps, $dep;
}
}
return join(",", @matched_deps);
}
sub write_substvar($$$$) {
my ($pkgname, $varname, $value, $substvars) = @_;
my @contents;
my $varset = 0;
my $file = (-r $substvars) ? $substvars : "debian/substvars";
if (-r $file) {
open(FILE, "<$file") or die "Unable to open substvars file '$file' for reading\n";
while (<FILE>) {
if (!$varset && /^\s*\Q$varname=\E/) {
push @contents, "$varname=$value\n";
$varset = 1;
} else {
push @contents, $_;
}
}
close(FILE);
} else {
# Fallback to default
$file = $substvars;
}
open(FILE, ">$file.tmp") or die "Unable to open substvars file '$file.tmp' for writing\n";
for (@contents) {
print FILE $_;
}
if (!$varset) {
print FILE "$varname=$value", "\n";
}
close(FILE);
File::Copy::move("$file.tmp", "$file");
}
init();
my $control = new Dpkg::Control;
my %shlibsvars;
foreach my $package (@{$dh{DOPACKAGES}}) {
my $pkg_substvars = sprintf("debian/%ssubstvars", pkgext($package));
my $pkg = $control->get_pkg_by_name($package);
for my $fieldname (@fields) {
if (exists $pkg->{$fieldname}) {
my $fieldval = $pkg->{$fieldname};
my $pkgname = $pkg->{Package};