summaryrefslogtreecommitdiff
path: root/debian/build
diff options
context:
space:
mode:
authorBen Gertzfield <che@src.gnome.org>1998-11-17 21:19:25 +0000
committerBen Gertzfield <che@src.gnome.org>1998-11-17 21:19:25 +0000
commit9b26da82ca4dc1a9d8707d6a581dc0b51f9092fb (patch)
tree351a57944fbaca06b2d1b0a74cba1753e13ff4f8 /debian/build
parentcb4a61eaa371d17038f88639fd5fc742f51f4c6d (diff)
downloadgdk-pixbuf-9b26da82ca4dc1a9d8707d6a581dc0b51f9092fb.tar.gz
Added Debian CVS build scripts. To build a snapshot Debian release,
simply run, from within the top level of the gtk+ directory: [ben@gilgamesh:~/src/gtk-snap/gtk+]% debian/build 1:16PM This will build a Debian snapshot release, updating debian/changelog, and place the resultant .debs in .. (~/src/gtk-snap/ in this example). The version numbers are automatically updated, and look like: YYYYMMDD.XX where YYYY is the four-digit year (Y10K problem!) and MM is the month (01-12) and DD is the day (01-31). XX is the build number; it starts at 01 and debian/build increments it if you build from CVS more than once in a day. If you're doing more than 99 CVS builds in one day you need your head checked. *NOTE*! The debian/build script I've written does not check in the changes it has made to debian/changelog; that'd be scary and probably generate too many log files all the time. This really doesn't matter *too* much, since debian/changelog is kind of irrelevant with CVS builds. Just know that the scant information that is in there will not be updated via CVS. Also, for obvious reasons, the debian/build script I've written disables PGP signing of the resultant .changes and .dsc file. Since these packages are not going into any archives, this will not be a problem. Of course, all this doesn't mean much to you if you don't have the Debian dpkg-dev tools and debhelper installed, so don't worry if you have no idea what I'm talking about. :)
Diffstat (limited to 'debian/build')
-rwxr-xr-xdebian/build62
1 files changed, 62 insertions, 0 deletions
diff --git a/debian/build b/debian/build
new file mode 100755
index 000000000..7a70d07bb
--- /dev/null
+++ b/debian/build
@@ -0,0 +1,62 @@
+#!/usr/bin/perl -w
+
+ # Adjust debian/changelog and build a new
+ # Debian package of a CVS archive.
+
+ # Written 17 November 1998 by Ben Gertzfield
+ # <che@debian.org>
+
+ # This work is released under the GNU
+ # General Public License, version 2 or
+ # later.
+
+use strict;
+use diagnostics;
+use File::Copy;
+
+my $maintainer = 'Ben Gertzfield <che@debian.org>';
+
+my @date = localtime;
+
+my $datestr = sprintf("%d%.2d%.2d", $date[5] + 1900, $date[4] + 1, $date[3]);
+my $revision = '01';
+
+open (CHANGELOG, 'debian/changelog') or die "Couldn't open debian/changelog: $!\n";
+
+$_ = <CHANGELOG>;
+chomp;
+
+close CHANGELOG;
+
+my ($package, $last_date, $last_revision) = /^(.*?) \((.*?)\.(.*)?\)/;
+
+if ($last_date eq $datestr) {
+ $revision = sprintf("%.2d", $last_revision + 1);
+}
+
+my $new_version = "$datestr.$revision";
+
+copy('debian/changelog', 'debian/changelog.old') or die "Couldn't copy debian/changelog to debian/changelog.old: $!\n";
+
+open(NEWCHANGELOG, ">debian/changelog") or die "Couldn't open debian/changelog for writing: $!\n";
+
+print NEWCHANGELOG "$package ($new_version) unstable; urgency=low\n\n * CVS snapshot build at " . scalar localtime() . "\n\n -- $maintainer " . `date -R` . "\n";
+
+open(OLDCHANGELOG, "debian/changelog.old") or die "Couldn't open debian/changelog.old: $!\n";
+
+while (<OLDCHANGELOG>) {
+ print NEWCHANGELOG;
+}
+
+close OLDCHANGELOG;
+close NEWCHANGELOG;
+
+unlink('debian/changelog.old') or die "Couldn't unlink debian/changelog.old: $!\n";
+
+open(NEWVERSION, '>debian/version') or die "Couldn't open debian/version for writing: $!\n";
+print NEWVERSION $new_version;
+close NEWVERSION;
+
+system('dpkg-buildpackage -rfakeroot -us -uc');
+unlink 'debian/version' or die "Couldn't unlink debian/version: $!\n";
+