Browse Source

Now the rpm src and binary package properly build. This was pretty

involved, next I need to decide whether to establish and different
build and package area.  Probably, at least a package area so it
doesn't interfere with the system.
master
freesource 22 years ago
parent
commit
b0ca75da21
  1. 2
      Makefile.pkg
  2. 68
      gbootroot_pkg
  3. 216
      pkg/rpm/filelist
  4. 43
      pkg/rpm/gbootroot-mdk.spec
  5. 44
      pkg/rpm/gbootroot.spec

2
Makefile.pkg

@ -143,6 +143,8 @@ clean:
rm -rf $(UTIL_DIR)
rm -f $(GENEXT2_DIR)/{genext2fs,genext2fs.o}
rm -f $(ROOT_FS_DIR)/{root_fs_helper,Initrd.gz}
rm -f $(BASE_DIR)/user-mode-linux/usr/bin/*
rm -f $(BASE_DIR)/user-mode-linux/usr/lib/uml/{modules*,port-helper}
clean-sources:
rm -f $(SOURCE_DIR)/*

68
gbootroot_pkg

@ -75,7 +75,8 @@ 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 @rpm_packages = qw(gbootroot.spec gbootroot-mdk.spec);
#my @rpm_packages = qw(gbootroot.spec gbootroot-mdk.spec);
my @rpm_packages = qw(gbootroot-mdk.spec);
# Other vars
@ -101,6 +102,9 @@ close(CVS);
$packaging_place = "$packaging_place/$prog-$version";
my $packaging_place_rep = "$packaging_place/yard/replacements";
#my $pristine_source_package = "$packaging_place_orig/$prog-$version" .
#".tar.gz";
my $pristine_source_package = "$prog-$version" . ".tar.gz";
# Do we want a deb, rpm or both
@ -170,6 +174,9 @@ chdir($gbootroot_cvs) or die "Couldn't change to $gbootroot_cvs: $!\n";
# Basically we are just concerned with the first part of cp and will
# use home_builder to make sure the directory exists.
system "rm -rf $packaging_place";
system "install -d $packaging_place";
foreach (@make_lines) {
s/\t//;
if (/cp|mkdir/) {
@ -232,12 +239,11 @@ if (-d $packaging_place) {
# however there will be sections of the Makefile set-up for my own
# personal automation used by this program.
my $pristine_source_package = "$packaging_place_orig/$prog-$version" .
".tar.gz";
print "$pristine_source_package $packaging_place\n";
exit if $ARGV[0] eq "src";
unlink($pristine_source_package) if -e $prinstine_source_package;
system "tar cvfz $pristine_source_package $packaging_place";
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";
# Now we to the dh_make thing, and setup the time, version, and defaults.
@ -374,13 +380,36 @@ if ( $ARGV[0] eq "both" || $ARGV[0] eq "rpm" ) {
# Here we create a filelist from the debian package
# and get to add to the pristine sources with the updated
# filelist in pkg/rpm/filelist which will be used by the spec.
# We also make modification to things which are Debian so
# the filelist works.
# The files which don't exist in *deb are pruned out here, this
# could be automated, but it is better to do it manually just to
# to make sure no necessary files aren't being included, the output
# from rpm -bl specfile
my %extra_files = (
"/usr/share/doc-base/gbootroot\n", 1,
"/usr/lib/menu/gbootroot\n", 1,
"/usr/lib/bootroot/yard/Replacements/lib/modules/CVS/Root\n", 1,
"/usr/lib/bootroot/yard/Replacements/lib/modules/CVS/Repository\n", 1,
"/usr/lib/bootroot/yard/Replacements/lib/modules/CVS/Entries\n", 1,
"/usr/share/doc/gbootroot/html/boot_root.4.gz\n", 1,
"/usr/share/doc/gbootroot/Changes.gz\n", 1,
"/usr/share/doc/gbootroot/copyright\n", 1,
"/usr/share/doc/gbootroot/changelog.Debian.gz\n", 1
);
my $arch = `grep Architecture $packaging_defaults/control |\
cut -d " " -f 2`;
chomp $arch;
my $program = dirname($packaging_place) . "/" .$prog . "_"
. "$version-$revision" . "_" . $arch . ".deb";
die "Can't fine $program\n" if !-e $program;
my $files = "dswim -qpl $program|";
open (FILELIST,">$rpm_packaging_place/filelist") or
die "Couldn't open $rpm_packaging_place/filelist: $!\n";
@ -390,22 +419,33 @@ if ( $ARGV[0] eq "both" || $ARGV[0] eq "rpm" ) {
if ( m,^\./, ) {
s,^\.,,;
print FILELIST $_;
if ( $extra_files{"$_"} == 1 ) {
if ( /Changes\.gz/ ) {
s/Changes\.gz/Changes/;
}
else {
next;
}
}
print FILELIST "$_";
}
}
# For now will just use one definite place for SOURCES
my $source = dirname($packaging_place) . "/" . $prog . "_" . $version;
system "cp $source*tar.gz $SOURCES";
my $filelist = "pkg/rpm";
my $source = dirname($packaging_place) . "/" . $prog . "-" . $version;
system "cp $gbootroot_cvs/gbootroot.xpm $SOURCES";
system "cp $rpm_packaging_place/filelist $SOURCES";
system "cp $rpm_packaging_place/$package $SPECS";
system "install -d $packaging_place/$filelist";
system "cp $rpm_packaging_place/filelist $packaging_place/$filelist";
unlink($pristine_source_package) if -e $pristine_source_package;
chdir($packaging_place_orig);
system "tar cvfz $pristine_source_package $prog-$version";
system "cp $source.tar.gz $SOURCES";
# Time for the fun
system "rpm -ba $SPECS/$package";
}
} # both or rpm

216
pkg/rpm/filelist

@ -1,142 +1,168 @@
/etc/gbootroot/gbootrootrc
/usr/bin/gbootroot
/usr/bin/make_debian
/usr/bin/linuxbr
/usr/bin/uml_mconsole
/usr/bin/uml_moo
/usr/bin/uml_net
/usr/bin/uml_switch
/usr/bin/tunctl
/usr/bin/linux
/usr/lib/bootroot/yard_chrooted_tests
/usr/lib/bootroot/genext2fs
/usr/lib/bootroot/expect_uml
/usr/lib/bootroot/root_filesystem/root_fs_helper
/usr/lib/bootroot/root_filesystem/Initrd.gz
/usr/bin/make_debian
/usr/bin/uml_switch
/usr/lib/uml/port-helper
/usr/lib/bootroot/yard/Replacements/lib/modules/modules-2.2.tar
/usr/lib/bootroot/yard/Replacements/lib/modules/modules-2.4.tar
/usr/lib/bootroot/yard/Replacements/lib/modules/config
/usr/lib/bootroot/yard/Replacements/lib/modules/CVS/Root
/usr/lib/bootroot/yard/Replacements/lib/modules/CVS/Repository
/usr/lib/bootroot/yard/Replacements/lib/modules/CVS/Entries
/usr/lib/uml/port-helper
/usr/lib/menu/gbootroot
/usr/share/perl5/BootRoot/BootRoot.pm
/usr/share/perl5/BootRoot/Error.pm
/usr/share/perl5/BootRoot/UML.pm
/usr/share/perl5/BootRoot/Yard.pm
/usr/share/perl5/BootRoot/YardBox.pm
/usr/share/perl5/BootRoot/lsMode.pm
/usr/lib/bootroot/expect_uml
/usr/lib/bootroot/yard_chrooted_tests
/usr/lib/bootroot/genext2fs
/usr/lib/bootroot/root_filesystem/Initrd.gz
/usr/lib/bootroot/root_filesystem/root_fs_helper
/usr/X11R6/include/X11/pixmaps/gbootroot.xpm
/usr/share/doc/gbootroot/html/index.html
/usr/share/doc/gbootroot/html/images/gbootroot.jpg
/usr/share/doc/gbootroot/html/images/Editorspick.gif
/usr/share/doc/gbootroot/html/images/peng-movie.4.gif
/usr/share/doc/gbootroot/html/images/paths.jpg
/usr/share/doc/gbootroot/html/images/create.jpg
/usr/share/doc/gbootroot/html/images/template_search.jpg
/usr/share/doc/gbootroot/html/images/file.jpg
/usr/share/doc/gbootroot/html/images/screenshot.jpg
/usr/share/doc/gbootroot/html/images/verbosity_box.jpg
/usr/share/doc/gbootroot/html/images/ABS.jpg
/usr/share/doc/gbootroot/html/images/settings.jpg
/usr/share/doc/gbootroot/html/images/stripping.jpg
/usr/share/doc/gbootroot/html/images/screenshot2.jpg
/usr/share/doc/gbootroot/html/images/ARS.jpg
/usr/share/doc/gbootroot/html/images/replacements.jpg
/usr/share/doc/gbootroot/html/images/rateit80x18.gif
/usr/share/doc/gbootroot/html/images/gBSicon.jpg
/usr/share/doc/gbootroot/html/images/filesystem.jpg
/usr/share/doc/gbootroot/html/images/tests.jpg
/usr/share/doc/gbootroot/html/images/uml_box.jpg
/usr/share/doc/gbootroot/html/images/gBS.jpg
/usr/share/doc/gbootroot/html/images/yard_box.jpg
/usr/share/doc/gbootroot/html/bootroot.html
/usr/share/doc/gbootroot/Changes
/usr/share/gbootroot/yard/Replacements/CVS/Root
/usr/share/gbootroot/yard/Replacements/CVS/Repository
/usr/share/gbootroot/yard/Replacements/CVS/Entries
/usr/share/gbootroot/yard/Replacements/dev/CVS/Root
/usr/share/gbootroot/yard/Replacements/dev/CVS/Repository
/usr/share/gbootroot/yard/Replacements/dev/CVS/Entries
/usr/share/gbootroot/yard/Replacements/etc/rc
/usr/share/gbootroot/yard/Replacements/etc/CVS/Root
/usr/share/gbootroot/yard/Replacements/etc/CVS/Repository
/usr/share/gbootroot/yard/Replacements/etc/CVS/Entries
/usr/share/gbootroot/yard/Replacements/etc/network/CVS/Root
/usr/share/gbootroot/yard/Replacements/etc/network/CVS/Repository
/usr/share/gbootroot/yard/Replacements/etc/network/CVS/Entries
/usr/share/gbootroot/yard/Replacements/etc/network/interfaces
/usr/share/gbootroot/yard/Replacements/etc/fstab.debian
/usr/share/gbootroot/yard/Replacements/etc/gettydefs
/usr/share/gbootroot/yard/Replacements/etc/group-debian
/usr/share/gbootroot/yard/Replacements/etc/group.debian
/usr/share/gbootroot/yard/Replacements/etc/hostname
/usr/share/gbootroot/yard/Replacements/etc/hosts
/usr/share/gbootroot/yard/Replacements/etc/inittab
/usr/share/gbootroot/yard/Replacements/etc/inittab.agetty
/usr/share/gbootroot/yard/Replacements/etc/inittab.debian
/usr/share/gbootroot/yard/Replacements/etc/inittab.mingetty
/usr/share/gbootroot/yard/Replacements/etc/ld.so.conf
/usr/share/gbootroot/yard/Replacements/etc/apt/CVS/Root
/usr/share/gbootroot/yard/Replacements/etc/apt/CVS/Repository
/usr/share/gbootroot/yard/Replacements/etc/apt/CVS/Entries
/usr/share/gbootroot/yard/Replacements/etc/apt/sources.list
/usr/share/gbootroot/yard/Replacements/etc/motd
/usr/share/gbootroot/yard/Replacements/etc/networks
/usr/share/gbootroot/yard/Replacements/etc/pam.conf
/usr/share/gbootroot/yard/Replacements/etc/passwd
/usr/share/gbootroot/yard/Replacements/etc/passwd-debian
/usr/share/gbootroot/yard/Replacements/etc/passwd.debian
/usr/share/gbootroot/yard/Replacements/etc/rc
/usr/share/gbootroot/yard/Replacements/etc/securetty.debian
/usr/share/gbootroot/yard/Replacements/etc/shadow.debian
/usr/share/gbootroot/yard/Replacements/etc/termcap
/usr/share/gbootroot/yard/Replacements/etc/ttytype
/usr/share/gbootroot/yard/Replacements/etc/hosts
/usr/share/gbootroot/yard/Replacements/etc/pam.d/CVS/Root
/usr/share/gbootroot/yard/Replacements/etc/pam.d/CVS/Repository
/usr/share/gbootroot/yard/Replacements/etc/pam.d/CVS/Entries
/usr/share/gbootroot/yard/Replacements/etc/pam.d/other
/usr/share/gbootroot/yard/Replacements/etc/apt/CVS/Root
/usr/share/gbootroot/yard/Replacements/etc/apt/CVS/Repository
/usr/share/gbootroot/yard/Replacements/etc/apt/CVS/Entries
/usr/share/gbootroot/yard/Replacements/etc/apt/sources.list
/usr/share/gbootroot/yard/Replacements/etc/init.d/rcS.example
/usr/share/gbootroot/yard/Replacements/etc/init.d/rc.example
/usr/share/gbootroot/yard/Replacements/etc/inittab.example-helper
/usr/share/gbootroot/yard/Replacements/etc/inittab.mingetty
/usr/share/gbootroot/yard/Replacements/etc/group.example
/usr/share/gbootroot/yard/Replacements/etc/pam.conf
/usr/share/gbootroot/yard/Replacements/etc/linuxrc
/usr/share/gbootroot/yard/Replacements/etc/group-debian
/usr/share/gbootroot/yard/Replacements/etc/ioctl.save
/usr/share/gbootroot/yard/Replacements/etc/termcap
/usr/share/gbootroot/yard/Replacements/etc/inittab.example-deb-nodevfs
/usr/share/gbootroot/yard/Replacements/etc/group.debian
/usr/share/gbootroot/yard/Replacements/etc/nsswitch.conf.example
/usr/share/gbootroot/yard/Replacements/etc/passwd-debian
/usr/share/gbootroot/yard/Replacements/etc/fstab.debian
/usr/share/gbootroot/yard/Replacements/etc/fstab.example
/usr/share/gbootroot/yard/Replacements/etc/securetty.debian
/usr/share/gbootroot/yard/Replacements/etc/network/CVS/Root
/usr/share/gbootroot/yard/Replacements/etc/network/CVS/Repository
/usr/share/gbootroot/yard/Replacements/etc/network/CVS/Entries
/usr/share/gbootroot/yard/Replacements/etc/network/interfaces
/usr/share/gbootroot/yard/Replacements/etc/init.d/CVS/Root
/usr/share/gbootroot/yard/Replacements/etc/init.d/CVS/Repository
/usr/share/gbootroot/yard/Replacements/etc/init.d/CVS/Entries
/usr/share/gbootroot/yard/Replacements/etc/init.d/rcS.helper
/usr/share/gbootroot/yard/Replacements/etc/init.d/halt.example
/usr/share/gbootroot/yard/Replacements/etc/init.d/reboot.example
/usr/share/gbootroot/yard/Replacements/etc/passwd.example
/usr/share/gbootroot/yard/Replacements/etc/group.example
/usr/share/gbootroot/yard/Replacements/etc/nsswitch.conf.example
/usr/share/gbootroot/yard/Replacements/etc/fstab.example
/usr/share/gbootroot/yard/Replacements/etc/init.d/rc.example
/usr/share/gbootroot/yard/Replacements/etc/init.d/rcS.example
/usr/share/gbootroot/yard/Replacements/etc/hostname
/usr/share/gbootroot/yard/Replacements/etc/inittab.example.mingetty-rpm
/usr/share/gbootroot/yard/Replacements/etc/passwd.debian
/usr/share/gbootroot/yard/Replacements/etc/ttytype
/usr/share/gbootroot/yard/Replacements/etc/gettydefs
/usr/share/gbootroot/yard/Replacements/etc/passwd
/usr/share/gbootroot/yard/Replacements/etc/inittab.example-deb
/usr/share/gbootroot/yard/Replacements/etc/inittab.example-deb-nodevfs
/usr/share/gbootroot/yard/Replacements/etc/inittab.example.agetty-slack
/usr/share/gbootroot/yard/Replacements/etc/securetty.example
/usr/share/gbootroot/yard/Replacements/etc/networks
/usr/share/gbootroot/yard/Replacements/etc/ld.so.conf
/usr/share/gbootroot/yard/Replacements/etc/inittab.example.mingetty-rpm-nodevfs
/usr/share/gbootroot/yard/Replacements/etc/securetty.example
/usr/share/gbootroot/yard/Replacements/etc/inittab.example.agetty-slack
/usr/share/gbootroot/yard/Replacements/etc/passwd.example
/usr/share/gbootroot/yard/Replacements/etc/inittab
/usr/share/gbootroot/yard/Replacements/etc/inittab.agetty
/usr/share/gbootroot/yard/Replacements/etc/inittab.example.agetty-slack-nodevfs
/usr/share/gbootroot/yard/Replacements/etc/inittab.example.mingetty-rpm
/usr/share/gbootroot/yard/Replacements/etc/inittab.debian
/usr/share/gbootroot/yard/Replacements/etc/shadow.debian
/usr/share/gbootroot/yard/Replacements/usr/CVS/Root
/usr/share/gbootroot/yard/Replacements/usr/CVS/Repository
/usr/share/gbootroot/yard/Replacements/usr/CVS/Entries
/usr/share/gbootroot/yard/Replacements/usr/src/CVS/Root
/usr/share/gbootroot/yard/Replacements/usr/src/CVS/Repository
/usr/share/gbootroot/yard/Replacements/usr/src/CVS/Entries
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/CVS/Root
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/CVS/Repository
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/CVS/Entries
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/CVS/Root
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/CVS/Repository
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/CVS/Entries
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/mtd/CVS/Root
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/mtd/CVS/Repository
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/mtd/CVS/Entries
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/mtd/devices/CVS/Root
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/mtd/devices/CVS/Repository
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/mtd/devices/CVS/Entries
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/mtd/devices/mtdram.o
/usr/share/gbootroot/yard/Replacements/usr/src/linux-um/drivers/mtd/devices/blkmtd.o
/usr/share/gbootroot/yard/Replacements/home/CVS/Root
/usr/share/gbootroot/yard/Replacements/home/CVS/Repository
/usr/share/gbootroot/yard/Replacements/home/CVS/Entries
/usr/share/gbootroot/yard/Replacements/home/user/CVS/Root
/usr/share/gbootroot/yard/Replacements/home/user/CVS/Repository
/usr/share/gbootroot/yard/Replacements/home/user/CVS/Entries
/usr/share/gbootroot/yard/Replacements/home/user/.bash_profile.debian
/usr/share/gbootroot/yard/Replacements/home/user/.bashrc.debian
/usr/share/gbootroot/yard/Replacements/home/user/README
/usr/share/gbootroot/yard/Replacements/home/user/.bashrc.debian
/usr/share/gbootroot/yard/Replacements/home/user/.bash_profile.debian
/usr/share/gbootroot/yard/Replacements/mnt1/CVS/Root
/usr/share/gbootroot/yard/Replacements/mnt1/CVS/Repository
/usr/share/gbootroot/yard/Replacements/mnt1/CVS/Entries
/usr/share/gbootroot/yard/Replacements/mnt2/CVS/Root
/usr/share/gbootroot/yard/Replacements/mnt2/CVS/Repository
/usr/share/gbootroot/yard/Replacements/mnt2/CVS/Entries
/usr/share/gbootroot/yard/Replacements/root/CVS/Root
/usr/share/gbootroot/yard/Replacements/root/CVS/Repository
/usr/share/gbootroot/yard/Replacements/root/CVS/Entries
/usr/share/gbootroot/yard/Replacements/root/.bashrc.debian
/usr/share/gbootroot/yard/Replacements/root/.profile
/usr/share/gbootroot/yard/Replacements/root/.profile.debian
/usr/share/gbootroot/yard/Replacements/root/.profile
/usr/share/gbootroot/yard/Replacements/root/.bashrc.debian
/usr/share/gbootroot/yard/Replacements/root/umlnet
/usr/share/gbootroot/yard/templates/Example-Debian.yard
/usr/share/gbootroot/yard/templates/Example-EmptyFS.yard
/usr/share/gbootroot/yard/templates/Example-Mini.yard
/usr/share/gbootroot/yard/templates/Example-EmptyFS.yard
/usr/share/gbootroot/yard/templates/Initrd.yard
/usr/share/gbootroot/yard/templates/Helper.yard
/usr/share/gbootroot/yard/templates/Example.yard
/usr/share/gbootroot/genext2fs/genext2fs.c
/usr/share/gbootroot/genext2fs/Makefile
/usr/share/gbootroot/genext2fs/dev.txt
/usr/share/gbootroot/genext2fs/Makefile
/usr/share/gbootroot/genext2fs/device_table.txt
/usr/share/doc/gbootroot/html/images/ABS.jpg
/usr/share/doc/gbootroot/html/images/ARS.jpg
/usr/share/doc/gbootroot/html/images/create.jpg
/usr/share/doc/gbootroot/html/images/file.jpg
/usr/share/doc/gbootroot/html/images/filesystem.jpg
/usr/share/doc/gbootroot/html/images/gBS.jpg
/usr/share/doc/gbootroot/html/images/gBSicon.jpg
/usr/share/doc/gbootroot/html/images/gbootroot.jpg
/usr/share/doc/gbootroot/html/images/paths.jpg
/usr/share/doc/gbootroot/html/images/replacements.jpg
/usr/share/doc/gbootroot/html/images/screenshot.jpg
/usr/share/doc/gbootroot/html/images/screenshot2.jpg
/usr/share/doc/gbootroot/html/images/settings.jpg
/usr/share/doc/gbootroot/html/images/stripping.jpg
/usr/share/doc/gbootroot/html/images/template_search.jpg
/usr/share/doc/gbootroot/html/images/tests.jpg
/usr/share/doc/gbootroot/html/images/uml_box.jpg
/usr/share/doc/gbootroot/html/images/verbosity_box.jpg
/usr/share/doc/gbootroot/html/images/yard_box.jpg
/usr/share/doc/gbootroot/html/images/Editorspick.gif
/usr/share/doc/gbootroot/html/images/peng-movie.4.gif
/usr/share/doc/gbootroot/html/images/rateit80x18.gif
/usr/share/doc/gbootroot/html/bootroot.html
/usr/share/doc/gbootroot/html/index.html
/usr/share/doc/gbootroot/html/boot_root.4.gz
/usr/share/doc/gbootroot/copyright
/usr/share/doc/gbootroot/Changes.gz
/usr/share/doc/gbootroot/changelog.Debian.gz
/usr/X11R6/include/X11/pixmaps/gbootroot.xpm
/etc/gbootroot/gbootrootrc
/usr/share/gbootroot/genext2fs/genext2fs.c
/usr/share/perl5/BootRoot/lsMode.pm
/usr/share/perl5/BootRoot/Options.pm
/usr/share/perl5/BootRoot/UML.pm
/usr/share/perl5/BootRoot/BootRoot.pm
/usr/share/perl5/BootRoot/Yard.pm
/usr/share/perl5/BootRoot/YardBox.pm
/usr/share/perl5/BootRoot/Error.pm

43
pkg/rpm/gbootroot-mdk.spec

@ -8,10 +8,21 @@
# rpm -ba gbootroot.spec
# Update this according to version
%define version 1.3.6
# Update this according to version, and if you want to copy in your own
# sources define base_dir and put them in source_dir. Define filelist if
# you want it included in the sources.
%define version 1.4.0
%define release 1mdk
%define kversion 2.4.19
%define patch_version 40
%define util_ver 20021103
%define kernel_source linux-%{kversion}.tar.bz2
%define patch_1 uml-patch-%{kversion}-%{patch_version}.bz2
%define utilities uml_utilities_%{util_ver}.tar.bz2
%define base_dir /home/mttrader/gbootroot/gbootroot
%define source_dir %{base_dir}/sources
%define build_dir /gbootroot-%{version}
%define filelist %{base_dir}/pkg/rpm/filelist
Summary: Boot/Root Filesystem Distribution testing and creation.
Name: gbootroot
@ -20,7 +31,7 @@ Release: %{release}
Copyright: GPL
# was Utilities/System or Development/System
Group: Development/Other
Source: http://prdownloads.sourceforge.net/gbootroot/gbootroot_%{version}.orig.tar.gz
Source: http://prdownloads.sourceforge.net/gbootroot/gbootroot-%{version}.tar.gz
URL: http://gbootroot.sourceforge.net
Distribution: BootRoot
Vendor: Free Software
@ -63,24 +74,38 @@ as mdk.
%prep
%setup -n gbootroot-%{version}.orig
%setup -n gbootroot-%{version}
chown -R root:root .
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{kernel_source} ] ; then
if [ -e %{source_dir}/%{kernel_source} ] ; then
cp -fa %{source_dir}/%{kernel_source} $RPM_BUILD_DIR/%{build_dir}/sources;
fi;
fi;
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{patch_1} ] ; then
if [ -e %{source_dir}/%{patch_1} ] ; then
cp -fa %{source_dir}/%{patch_1} $RPM_BUILD_DIR/%{build_dir}/sources;
fi;
fi;
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{utilities} ] ; then
if [ -e %{source_dir}/%{patch_1} ] ; then
cp -fa %{source_dir}/%{utilities} $RPM_BUILD_DIR/%{build_dir}/sources;
fi;
fi;
# make just does an install
%build
make
%install
make
make install
%clean
make clean
make clean-sources
# Update this as necessary
# dswim -ql gbootroot > ~/gbootroot/gbootroot/list
# will read this all from a files list %files -f filelist
%files -f %{_topdir}/SOURCES/filelist
%files -f %{_topdir}/BUILD/%{build_dir}/pkg/rpm/filelist
%docdir /usr/share/doc/gbootroot
%attr(4755, root, root) /usr/bin/uml_net
%config /etc/gbootroot/gbootrootrc

44
pkg/rpm/gbootroot.spec

@ -7,10 +7,21 @@
# cp gbootroot.xpm /usr/src/redhat/SOURCES/
# rpm -ba gbootroot.spec
# Update this according to version
%define version 1.3.6
# Update this according to version, and if you want to copy in your own
# sources define base_dir and put them in source_dir. Define filelist if
# you want it included in the sources.
%define version 1.4.0
%define release 1
%define kversion 2.4.19
%define patch_version 40
%define util_ver 20021103
%define kernel_source linux-%{kversion}.tar.bz2
%define patch_1 uml-patch-%{kversion}-%{patch_version}.bz2
%define utilities uml_utilities_%{util_ver}.tar.bz2
%define base_dir /home/mttrader/gbootroot/gbootroot
%define source_dir %{base_dir}/sources
%define build_dir /gbootroot-%{version}
%define filelist %{base_dir}/pkg/rpm/filelist
Summary: Boot/Root Filesystem Distribution testing and creation.
@ -20,7 +31,7 @@ Release: %{release}
Copyright: GPL
# was Utilities/System or Development/System
Group: Development/Other
Source: http://prdownloads.sourceforge.net/gbootroot/gbootroot_%{version}.orig.tar.gz
Source: http://prdownloads.sourceforge.net/gbootroot/gbootroot-%{version}.tar.gz
URL: http://gbootroot.sourceforge.net
Distribution: BootRoot
Vendor: Free Software
@ -63,24 +74,39 @@ as mdk.
%prep
%setup -n gbootroot-%{version}.orig
%setup -n gbootroot-%{version}
chown -R root:root .
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{kernel_source} ] ; then
if [ -e %{source_dir}/%{kernel_source} ] ; then
cp -fa %{source_dir}/%{kernel_source} $RPM_BUILD_DIR/%{build_dir}/sources;
fi;
fi;
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{patch_1} ] ; then
if [ -e %{source_dir}/%{patch_1} ] ; then
cp -fa %{source_dir}/%{patch_1} $RPM_BUILD_DIR/%{build_dir}/sources;
fi;
fi;
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{utilities} ] ; then
if [ -e %{source_dir}/%{patch_1} ] ; then
cp -fa %{source_dir}/%{utilities} $RPM_BUILD_DIR/%{build_dir}/sources;
fi;
fi;
# make just does an install
%build
make
%install
make
make install
%clean
make clean
make clean-sources
# Update this as necessary
# dswim -ql gbootroot > ~/gbootroot/gbootroot/list
# will read this all from a files list %files -f filelist
%files -f %{_topdir}/SOURCES/filelist
%files -f %{_topdir}/BUILD/%{build_dir}/pkg/rpm/filelist
%docdir /usr/share/doc/gbootroot
%attr(4755, root, root) /usr/bin/uml_net
%config /etc/gbootroot/gbootrootrc

Loading…
Cancel
Save