aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-05-31 10:45:30 +0000
committerFrancois Pons <fpons@mandriva.com>2002-05-31 10:45:30 +0000
commitf3a8b389ff055d33ec0c5bd64ae91d7b9f11a586 (patch)
tree7a9beaf97df0499edf33aa828512577d2e0708b5
parent548baa81a0a4e3db8120e9d0e33cf75c1bf77a5e (diff)
downloadperl-URPM-f3a8b389ff055d33ec0c5bd64ae91d7b9f11a586.tar
perl-URPM-f3a8b389ff055d33ec0c5bd64ae91d7b9f11a586.tar.gz
perl-URPM-f3a8b389ff055d33ec0c5bd64ae91d7b9f11a586.tar.bz2
perl-URPM-f3a8b389ff055d33ec0c5bd64ae91d7b9f11a586.tar.xz
perl-URPM-f3a8b389ff055d33ec0c5bd64ae91d7b9f11a586.zip
initial revision.
-rwxr-xr-xbuild_rpm19
-rw-r--r--perl-URPM.spec50
2 files changed, 69 insertions, 0 deletions
diff --git a/build_rpm b/build_rpm
new file mode 100755
index 0000000..c52078c
--- /dev/null
+++ b/build_rpm
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+RPM=`rpm --eval '%{_topdir}'`
+[ -d "$RPM/SPECS" -a -d "$RPM/SOURCES" ] || exit 1
+
+VERSION=`perl -ne '/VERSION\s+=[^0-9\.]*([0-9\.]+)/ and print "$1\n"' URPM.pm`
+
+echo "building URPM version $VERSION"
+
+rm -f "URPM-$VERSION.tar.gz"
+perl Makefile.PL
+make dist
+[ $? = 0 ] || exit 2
+[ -f "URPM-$VERSION.tar.gz" ] || exit 3
+
+cp -f perl-URPM.spec "$RPM/SPECS"
+bzme URPM-$VERSION.tar.gz
+mv -f URPM-$VERSION.tar.bz2 "$RPM/SOURCES"
+rpm -ba --clean --rmsource "$RPM/SPECS/perl-URPM.spec"
diff --git a/perl-URPM.spec b/perl-URPM.spec
new file mode 100644
index 0000000..36cab3e
--- /dev/null
+++ b/perl-URPM.spec
@@ -0,0 +1,50 @@
+%define name perl-URPM
+%define real_name URPM
+%define release 1mdk
+
+%{expand:%%define version %(perl -ne '/VERSION\s+=[^0-9\.]*([0-9\.]+)/ and print "$1\n"' URPM.pm)}
+
+Summary: URPM module for perl
+Name: %{name}
+Version: %{version}
+Release: %{release}
+License: GPL or Artistic
+Group: Development/Perl
+Distribution: Mandrake Linux
+Source: %{real_name}-%{version}.tar.bz2
+Prefix: %{_prefix}
+BuildRequires: perl-devel
+BuildRoot: %{_tmppath}/%{name}-buildroot
+Requires: perl >= 5.601
+
+%description
+The URPM module allows you to manipulate rpm files, rpm header files and
+hdlist files and manage them in memory.
+
+%prep
+%setup -q -n %{real_name}-%{version}
+
+%build
+%{__perl} Makefile.PL PREFIX=%{prefix}
+make OPTIMIZE="$RPM_OPT_FLAGS" PREFIX=%{prefix}
+make test
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%makeinstall PREFIX=$RPM_BUILD_ROOT%{prefix}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc README
+#%{_libdir}/perl5/man/man3
+%{perl_sitearch}/URPM.pm
+%{perl_sitearch}/URPM
+%{perl_sitearch}/auto/URPM
+
+
+%changelog
+* Fri May 31 2002 François Pons <fpons@mandrakesoft.com> 0.01-1mdk
+- initial revision.