mirror of
https://github.com/fspc/gbootroot.git
synced 2025-02-23 09:03:23 -05:00
Now the rpm src and binary package properly build as a normal user.
This commit is contained in:
parent
4700c447d7
commit
394c22a2b4
@ -72,9 +72,9 @@ my $makefile = "Makefile.pkg";
|
|||||||
|
|
||||||
# RPM stuff - a filelist is used
|
# RPM stuff - a filelist is used
|
||||||
my $rpm_packaging_place = "$gbootroot_cvs/pkg/rpm";
|
my $rpm_packaging_place = "$gbootroot_cvs/pkg/rpm";
|
||||||
my $SPECS = "/usr/src/rpm/SPECS";
|
my $SPECS = "$ENV{HOME}/gbootroot/SPECS";
|
||||||
my $SOURCES = "/usr/src/rpm/SOURCES";
|
my $SOURCES = "$ENV{HOME}/gbootroot/SOURCES";
|
||||||
my $BUILD = "/usr/src/rpm/BUILD";
|
my $BUILD = "$ENV{HOME}/gbootroot/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);
|
#my @rpm_packages = qw(gbootroot-mdk.spec);
|
||||||
|
|
||||||
@ -244,10 +244,11 @@ chdir($packaging_place_orig);
|
|||||||
unlink($pristine_source_package) if -e $pristine_source_package;
|
unlink($pristine_source_package) if -e $pristine_source_package;
|
||||||
system "tar cvfz $pristine_source_package $prog-$version";
|
system "tar cvfz $pristine_source_package $prog-$version";
|
||||||
print "$pristine_source_package $packaging_place\n";
|
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.
|
# 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";
|
chdir($packaging_place) or die "Can't change to $packaging_place: $!\n";
|
||||||
system "dh_make -e $email";
|
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 ..
|
# Here the defined version and revision are updated ..
|
||||||
# Ofcourse maybe the revision shouldn't be touched.
|
# 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 ) {
|
foreach my $package ( @rpm_packages ) {
|
||||||
open (RPM_PLACE, "$rpm_packaging_place/$package" ) or
|
open (RPM_PLACE, "$rpm_packaging_place/$package" ) or
|
||||||
die "Couldn't open up $rpm_packaging_place/$package: $!\n";
|
die "Couldn't open up $rpm_packaging_place/$package: $!\n";
|
||||||
@ -427,14 +435,13 @@ if ( $ARGV[0] eq "both" || $ARGV[0] eq "rpm" ) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print FILELIST "$_";
|
print FILELIST "%attr(- root root) $_";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# For now will just use one definite place for SOURCES
|
# For now will just use one definite place for SOURCES
|
||||||
my $filelist = "pkg/rpm";
|
my $filelist = "pkg/rpm";
|
||||||
my $source = dirname($packaging_place) . "/" . $prog . "-" . $version;
|
|
||||||
system "cp $gbootroot_cvs/gbootroot.xpm $SOURCES";
|
system "cp $gbootroot_cvs/gbootroot.xpm $SOURCES";
|
||||||
system "cp $rpm_packaging_place/$package $SPECS";
|
system "cp $rpm_packaging_place/$package $SPECS";
|
||||||
system "install -d $packaging_place/$filelist";
|
system "install -d $packaging_place/$filelist";
|
||||||
|
@ -1,16 +1,20 @@
|
|||||||
# SPEC designed for Mandrake and Mandrake-type rpm-based distribution which
|
# SPEC designed for Mandrake and Mandrake-type rpm-based distribution which
|
||||||
# use perl and perl-base.
|
# use perl and perl-base.
|
||||||
|
|
||||||
# Set topdir in .rpmrcmacros .. %_topdir /usr/src/rpm
|
# cd %{_topdir}/SPECS
|
||||||
# cd /usr/src/redhat/SPECS
|
# place rpm source in %{_topdir}/SOURCES/
|
||||||
# place sources in /usr/src/redhat/SOURCES/
|
# optional: place linux*bz2, uml_patch* uml_utilities* in
|
||||||
# cp gbootroot.xpm /usr/src/redhat/SOURCES/
|
# $HOME/gbootroot/gbootroot/sources
|
||||||
# rpm -ba gbootroot.spec
|
# cp gbootroot.xpm %{_topdir}/SOURCES/
|
||||||
|
# rpm -ba %{_topdir}/SPECS/gbootroot.spec
|
||||||
|
|
||||||
# Update this according to version, and if you want to copy in your own
|
# 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
|
# sources define base_dir and put them in source_dir. You can build this
|
||||||
# you want it included in the sources.
|
# package as a normal user, just make sure to adjust _topdir so that
|
||||||
|
# /home/mttrader is your own echo $HOME, for instance, /home/person.
|
||||||
|
|
||||||
|
%define home /home/mttrader
|
||||||
|
%define _topdir %{home}/gbootroot
|
||||||
%define version 1.4.0
|
%define version 1.4.0
|
||||||
%define release 1mdk
|
%define release 1mdk
|
||||||
%define kversion 2.4.19
|
%define kversion 2.4.19
|
||||||
@ -19,11 +23,12 @@
|
|||||||
%define kernel_source linux-%{kversion}.tar.bz2
|
%define kernel_source linux-%{kversion}.tar.bz2
|
||||||
%define patch_1 uml-patch-%{kversion}-%{patch_version}.bz2
|
%define patch_1 uml-patch-%{kversion}-%{patch_version}.bz2
|
||||||
%define utilities uml_utilities_%{util_ver}.tar.bz2
|
%define utilities uml_utilities_%{util_ver}.tar.bz2
|
||||||
%define base_dir /home/mttrader/gbootroot/gbootroot
|
%define base_dir %{home}/gbootroot/gbootroot
|
||||||
%define source_dir %{base_dir}/sources
|
%define source_dir %{base_dir}/sources
|
||||||
%define build_dir /gbootroot-%{version}
|
%define build_dir /gbootroot-%{version}
|
||||||
%define filelist %{base_dir}/pkg/rpm/filelist
|
%define filelist %{base_dir}/pkg/rpm/filelist
|
||||||
|
|
||||||
|
|
||||||
Summary: Boot/Root Filesystem Distribution testing and creation.
|
Summary: Boot/Root Filesystem Distribution testing and creation.
|
||||||
Name: gbootroot
|
Name: gbootroot
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
@ -44,7 +49,7 @@ Icon: gbootroot.xpm
|
|||||||
|
|
||||||
# Extras
|
# Extras
|
||||||
#Patch: gbootroot-1.3.4-buildroot.patch
|
#Patch: gbootroot-1.3.4-buildroot.patch
|
||||||
#Buildroot: /home/somebody
|
Buildroot: /tmp/gbootroot
|
||||||
|
|
||||||
|
|
||||||
# Dependencies .. can you have two alternative deps like with deb?
|
# Dependencies .. can you have two alternative deps like with deb?
|
||||||
@ -75,7 +80,13 @@ as mdk.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n gbootroot-%{version}
|
%setup -n gbootroot-%{version}
|
||||||
chown -R root:root .
|
#chown -R root:root .
|
||||||
|
mkdir /tmp/gbootroot
|
||||||
|
install -d $HOME/gbootroot/RPMS/i386
|
||||||
|
install -d $HOME/gbootroot/BUILD
|
||||||
|
install -d $HOME/gbootroot/SOURCES
|
||||||
|
install -d $HOME/gbootroot/SPECS
|
||||||
|
install -d $HOME/gbootroot/SRPMS
|
||||||
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{kernel_source} ] ; then
|
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{kernel_source} ] ; then
|
||||||
if [ -e %{source_dir}/%{kernel_source} ] ; then
|
if [ -e %{source_dir}/%{kernel_source} ] ; then
|
||||||
cp -fa %{source_dir}/%{kernel_source} $RPM_BUILD_DIR/%{build_dir}/sources;
|
cp -fa %{source_dir}/%{kernel_source} $RPM_BUILD_DIR/%{build_dir}/sources;
|
||||||
@ -96,19 +107,20 @@ fi;
|
|||||||
make
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
#make clean
|
#make clean
|
||||||
#make clean-sources
|
#make clean-sources
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Update this as necessary
|
# Update this as necessary
|
||||||
# dswim -ql gbootroot > ~/gbootroot/gbootroot/list
|
# dswim -ql gbootroot > ~/gbootroot/gbootroot/list
|
||||||
# will read this all from a files list %files -f filelist
|
# will read this all from a files list %files -f filelist
|
||||||
%files -f %{_topdir}/BUILD/%{build_dir}/pkg/rpm/filelist
|
%files -f %{_topdir}/BUILD/%{build_dir}/pkg/rpm/filelist
|
||||||
%docdir /usr/share/doc/gbootroot
|
%attr(- root root) %docdir /usr/share/doc/gbootroot
|
||||||
%attr(4755, root, root) /usr/bin/uml_net
|
%attr(4755, root, root) /usr/bin/uml_net
|
||||||
%config /etc/gbootroot/gbootrootrc
|
%attr(- root root) %config /etc/gbootroot/gbootrootrc
|
||||||
|
|
||||||
|
|
||||||
# Just include this
|
# Just include this
|
||||||
|
@ -1,15 +1,20 @@
|
|||||||
# SPEC designed for RedHat and RedHat-type rpm-based distribution which
|
# SPEC designed for RedHat and RedHat-type rpm-based distribution which
|
||||||
# just use perl, and not perl-base.
|
# just use perl, and not perl-base.
|
||||||
|
|
||||||
# Set topdir in .rpmrcmacros .. %_topdir /usr/src/rpm
|
# cd %{_topdir}/SPECS
|
||||||
# cd /usr/src/redhat/SPECS
|
# place rpm source in %{_topdir}/SOURCES/
|
||||||
# place sources in /usr/src/redhat/SOURCES/
|
# optional: place linux*bz2, uml_patch* uml_utilities* in
|
||||||
# cp gbootroot.xpm /usr/src/redhat/SOURCES/
|
# $HOME/gbootroot/gbootroot/sources
|
||||||
# rpm -ba gbootroot.spec
|
# cp gbootroot.xpm %{_topdir}/SOURCES/
|
||||||
|
# rpm -ba %{_topdir}/SPECS/gbootroot.spec
|
||||||
|
|
||||||
# Update this according to version, and if you want to copy in your own
|
# 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
|
# sources define base_dir and put them in source_dir. You can build this
|
||||||
# you want it included in the sources.
|
# package as a normal user, just make sure to adjust _topdir so that
|
||||||
|
# /home/mttrader is your own echo $HOME, for instance, /home/person.
|
||||||
|
|
||||||
|
%define home /home/mttrader
|
||||||
|
%define _topdir %{home}/gbootroot
|
||||||
%define version 1.4.0
|
%define version 1.4.0
|
||||||
%define release 1
|
%define release 1
|
||||||
%define kversion 2.4.19
|
%define kversion 2.4.19
|
||||||
@ -18,7 +23,7 @@
|
|||||||
%define kernel_source linux-%{kversion}.tar.bz2
|
%define kernel_source linux-%{kversion}.tar.bz2
|
||||||
%define patch_1 uml-patch-%{kversion}-%{patch_version}.bz2
|
%define patch_1 uml-patch-%{kversion}-%{patch_version}.bz2
|
||||||
%define utilities uml_utilities_%{util_ver}.tar.bz2
|
%define utilities uml_utilities_%{util_ver}.tar.bz2
|
||||||
%define base_dir /home/mttrader/gbootroot/gbootroot
|
%define base_dir %{home}/gbootroot/gbootroot
|
||||||
%define source_dir %{base_dir}/sources
|
%define source_dir %{base_dir}/sources
|
||||||
%define build_dir /gbootroot-%{version}
|
%define build_dir /gbootroot-%{version}
|
||||||
%define filelist %{base_dir}/pkg/rpm/filelist
|
%define filelist %{base_dir}/pkg/rpm/filelist
|
||||||
@ -41,11 +46,9 @@ Packager: Jonathan Rosenbaum <freesource@users.sourceforge.net>
|
|||||||
# Place icon in rpm sources directory prior to build
|
# Place icon in rpm sources directory prior to build
|
||||||
Icon: gbootroot.xpm
|
Icon: gbootroot.xpm
|
||||||
|
|
||||||
|
|
||||||
# Extras
|
# Extras
|
||||||
#Patch: gbootroot-1.3.4-buildroot.patch
|
#Patch: gbootroot-1.3.4-buildroot.patch
|
||||||
#Buildroot: /home/somebody
|
Buildroot: /tmp/gbootroot
|
||||||
|
|
||||||
|
|
||||||
# Dependencies .. can you have two alternative deps like with deb?
|
# Dependencies .. can you have two alternative deps like with deb?
|
||||||
PreReq: Gtk-Perl >= 0.7002
|
PreReq: Gtk-Perl >= 0.7002
|
||||||
@ -75,7 +78,13 @@ as mdk.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -n gbootroot-%{version}
|
%setup -n gbootroot-%{version}
|
||||||
chown -R root:root .
|
#chown -R root:root .
|
||||||
|
mkdir /tmp/gbootroot
|
||||||
|
install -d $HOME/gbootroot/RPMS/i386
|
||||||
|
install -d $HOME/gbootroot/BUILD
|
||||||
|
install -d $HOME/gbootroot/SOURCES
|
||||||
|
install -d $HOME/gbootroot/SPECS
|
||||||
|
install -d $HOME/gbootroot/SRPMS
|
||||||
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{kernel_source} ] ; then
|
if [ ! -e $RPM_BUILD_DIR/%{build_dir}/sources/%{kernel_source} ] ; then
|
||||||
if [ -e %{source_dir}/%{kernel_source} ] ; then
|
if [ -e %{source_dir}/%{kernel_source} ] ; then
|
||||||
cp -fa %{source_dir}/%{kernel_source} $RPM_BUILD_DIR/%{build_dir}/sources;
|
cp -fa %{source_dir}/%{kernel_source} $RPM_BUILD_DIR/%{build_dir}/sources;
|
||||||
@ -97,19 +106,20 @@ fi;
|
|||||||
make
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
#make clean
|
#make clean
|
||||||
#make clean-sources
|
#make clean-sources
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
# Update this as necessary
|
# Update this as necessary
|
||||||
# dswim -ql gbootroot > ~/gbootroot/gbootroot/list
|
# dswim -ql gbootroot > ~/gbootroot/gbootroot/list
|
||||||
# will read this all from a files list %files -f filelist
|
# will read this all from a files list %files -f filelist
|
||||||
%files -f %{_topdir}/BUILD/%{build_dir}/pkg/rpm/filelist
|
%files -f %{_topdir}/BUILD/%{build_dir}/pkg/rpm/filelist
|
||||||
%docdir /usr/share/doc/gbootroot
|
%attr(- root root) %docdir /usr/share/doc/gbootroot
|
||||||
%attr(4755, root, root) /usr/bin/uml_net
|
%attr(4755, root, root) /usr/bin/uml_net
|
||||||
%config /etc/gbootroot/gbootrootrc
|
%attr(- root root) %config /etc/gbootroot/gbootrootrc
|
||||||
|
|
||||||
# Just include this
|
# Just include this
|
||||||
##/usr/lib/menu/gbootroot
|
##/usr/lib/menu/gbootroot
|
||||||
|
Loading…
x
Reference in New Issue
Block a user