mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
87bfdee04d
simply run, from within the top level of the glib directory: [ben@gilgamesh:~/src/gtk-snap/glib]% debian/build 1:16AM 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. :)
63 lines
1.7 KiB
Perl
Executable File
63 lines
1.7 KiB
Perl
Executable File
#!/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";
|
|
|