projects/perl-Satcon/bin/satcon-make-rpm.pl | 143 ---------------------------- 1 file changed, 143 deletions(-)
New commits: commit 3bb1189d60163966607ff24fb77c43b2ec647aca Author: Jan Pazdziora jpazdziora@redhat.com Date: Tue Jan 11 12:37:00 2011 +0100
Removing satcon-make-rpm.pl from repository as we haven't been packaging it since 2008.
diff --git a/projects/perl-Satcon/bin/satcon-make-rpm.pl b/projects/perl-Satcon/bin/satcon-make-rpm.pl deleted file mode 100755 index a043e77..0000000 --- a/projects/perl-Satcon/bin/satcon-make-rpm.pl +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/perl -w -# Copyright (c) 2008--2010 Red Hat, Inc. -# -# This software is licensed to you under the GNU General Public License, -# version 2 (GPLv2). There is NO WARRANTY for this software, express or -# implied, including the implied warranties of MERCHANTABILITY or FITNESS -# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 -# along with this software; if not, see -# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. -# -# Red Hat trademarks are not licensed under GPLv2. No permission is -# granted to use or replicate Red Hat trademarks that are incorporated -# in this software or its documentation. -# - -use strict; - -use lib '/usr/lib/rpm'; - -use Satcon; -use File::Find; -use File::Temp qw/:POSIX/; -use File::Copy; -use Data::Dumper; -use Getopt::Long; -use RPM::Specfile; - -my $name; -my $version; -my $release; -my $basedir; -my $substitute; - -my $conf; -my $sourcedir; - -my $usage = "Usage: $0 -n name -v version -r release -c masterconf -s sourcetree [ -d destdir ]"; -GetOptions('name=s' => $name, - 'version=s' => $version, - 'release=s' => $release, - 'destdir=s' => $basedir, - 'conf=s' => $conf, - 'sourcedir=s' => $sourcedir, - 'prerender=s' => $substitute) or die $usage; - -die $usage - unless defined $conf and defined $sourcedir and defined $name and defined $version and defined $release; - -$basedir ||= '/'; - -$sourcedir =~ s(/+)(/)g; -$sourcedir =~ s(/$)(); - -my $tartmp = "$name-$version-$release.tar.gz"; -my $tmpdir = '/tmp/satcon-playground'; -mkdir $tmpdir, 0700 - or die "Can't mkdir $tmpdir: $!"; - -my $cmd = "/bin/tar zcf $tmpdir/$tartmp -C $sourcedir ."; -print "$cmd\n"; -system $cmd; - -my $spec = new RPM::Specfile; - -$spec->name($name); -$spec->version($version); -$spec->release($release); -$spec->summary("Red Hat Network Satellite Configuration"); -$spec->description($spec->summary); -$spec->license("whoknows"); -$spec->group("blah"); -$spec->add_changelog_entry('whoknows', 'Specfile autogenerated'); -$spec->push_require('perl(Satcon)'); - -$spec->buildarch('noarch'); -$spec->push_source($tartmp); -$spec->push_source($conf); - -$spec->prep(<<EOS); -%setup -q -c -rm -Rf %{name}-%{version} -mkdir %{name}-%{version} -cd %{name}-%{version} -EOS - -$spec->file_param("-f config-filelist"); -$spec->push_file("%defattr(-,root,root)"); -$spec->build(<<EOB); -# nop -EOB -$spec->clean('rm -rf $RPM_BUILD_ROOT'); -if ($substitute) { - $spec->install(<<EOI); -rm -Rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/$basedir -/usr/bin/satcon-deploy-tree.pl %{SOURCE1} . $RPM_BUILD_ROOT/$basedir -find $RPM_BUILD_ROOT -type f | sed -e "s@^$RPM_BUILD_ROOT@@g" > config-filelist -EOI -} -else { - $spec->install(<<EOI); -rm -Rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/$basedir -cp -fapRdv . $RPM_BUILD_ROOT/$basedir -cp -fapRdv %{SOURCE1} $RPM_BUILD_ROOT/$basedir -find $RPM_BUILD_ROOT -type f | sed -e "s@^$RPM_BUILD_ROOT@@g" > config-filelist -EOI -} - -$spec->write_specfile("$tmpdir/" . $spec->name . ".spec"); - -open FH, ">$tmpdir/macros" - or die "Can't create $tmpdir/macros: $!"; - -print FH qq{ -%_topdir $tmpdir -%_builddir %{_topdir} -%_rpmdir %{_topdir} -%_sourcedir %{_topdir} -%_specdir %{_topdir} -%_srcrpmdir . -}; - -close FH; - -open FH, ">$tmpdir/rpmrc" - or die "Can't create $tmpdir/rpmrc: $!"; -print FH qq{ -include: /usr/lib/rpm/rpmrc -macrofiles: /usr/lib/rpm/macros:$tmpdir/macros -}; -close FH; - -copy($conf, $tmpdir); -my $retval = system "rpm --rcfile $tmpdir/rpmrc -bs --rmsource --rmspec --clean $tmpdir/" . $spec->name . ".spec"; -$retval = $? >> 8; -if ($retval != 0) { - die "RPM building failed!\n"; -} - -unlink "$tmpdir/rpmrc", "$tmpdir/macros"; -rmdir $tmpdir; -
spacewalk-commits@lists.fedorahosted.org