Now the rpm src and binary package properly build as a normal user.

This commit is contained in:
freesource
2002-12-20 16:25:52 +00:00
parent 4700c447d7
commit 394c22a2b4
3 changed files with 64 additions and 35 deletions
+13 -6
View File
@@ -72,9 +72,9 @@ my $makefile = "Makefile.pkg";
# RPM stuff - a filelist is used
my $rpm_packaging_place = "$gbootroot_cvs/pkg/rpm";
my $SPECS = "/usr/src/rpm/SPECS";
my $SOURCES = "/usr/src/rpm/SOURCES";
my $BUILD = "/usr/src/rpm/BUILD";
my $SPECS = "$ENV{HOME}/gbootroot/SPECS";
my $SOURCES = "$ENV{HOME}/gbootroot/SOURCES";
my $BUILD = "$ENV{HOME}/gbootroot/BUILD";
my @rpm_packages = qw(gbootroot.spec gbootroot-mdk.spec);
#my @rpm_packages = qw(gbootroot-mdk.spec);
@@ -244,10 +244,11 @@ chdir($packaging_place_orig);
unlink($pristine_source_package) if -e $pristine_source_package;
system "tar cvfz $pristine_source_package $prog-$version";
print "$pristine_source_package $packaging_place\n";
system "rm -rf $packaging_place_orig/gbootroot_$version*";
# Now we to the dh_make thing, and setup the time, version, and defaults.
chdir($packaging_place) or die "Can't change to $packaging_place: $!\n";
system "dh_make -e $email";
@@ -347,6 +348,13 @@ if ( $ARGV[0] eq "both" || $ARGV[0] eq "rpm" ) {
# Here the defined version and revision are updated ..
# Ofcourse maybe the revision shouldn't be touched.
# The pristine source package is made once for debian, but
# a source package specific to rpm is made more than once.
my $source = dirname($packaging_place) . "/" . $prog . "-" . $version;
system "mv $source.tar.gz $source-pristine.tar.gz";
foreach my $package ( @rpm_packages ) {
open (RPM_PLACE, "$rpm_packaging_place/$package" ) or
die "Couldn't open up $rpm_packaging_place/$package: $!\n";
@@ -427,14 +435,13 @@ if ( $ARGV[0] eq "both" || $ARGV[0] eq "rpm" ) {
next;
}
}
print FILELIST "$_";
print FILELIST "%attr(- root root) $_";
}
}
# For now will just use one definite place for SOURCES
my $filelist = "pkg/rpm";
my $source = dirname($packaging_place) . "/" . $prog . "-" . $version;
system "cp $gbootroot_cvs/gbootroot.xpm $SOURCES";
system "cp $rpm_packaging_place/$package $SPECS";
system "install -d $packaging_place/$filelist";