SPECS: perl-mime-construct.spec - more cleanups, now looks like PL...

qboosh qboosh at pld-linux.org
Wed Oct 5 21:17:22 CEST 2005


Author: qboosh                       Date: Wed Oct  5 19:17:22 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- more cleanups, now looks like PLD perl-* spec

---- Files affected:
SPECS:
   perl-mime-construct.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SPECS/perl-mime-construct.spec
diff -u SPECS/perl-mime-construct.spec:1.2 SPECS/perl-mime-construct.spec:1.3
--- SPECS/perl-mime-construct.spec:1.2	Wed Oct  5 21:10:28 2005
+++ SPECS/perl-mime-construct.spec	Wed Oct  5 21:17:17 2005
@@ -1,17 +1,21 @@
 # $Revision$, $Date$
-
-%define filelist mime-construct-%{version}-filelist
-
+#
+# Conditional build:
+%bcond_without	tests	# do not perform "make test"
+#
+%include	/usr/lib/rpm/macros.perl
 Summary:	mime-construct - construct and optionally mail MIME messages
 Summary(pl):	mime-construct - tworzenie i opcjonalnie wysyłanie wiadomości MIME
 Name:		perl-mime-construct
 Version:	1.9
 Release:	1
 Vendor:		Roderick Schertler <roderick at argon.org>
-License:	Artistic
+License:	GPL v2+
 Group:		Applications/Mail
 Source0:	http://search.cpan.org/CPAN/authors/id/R/RO/ROSCH/mime-construct-%{version}.tar.gz
 URL:		http://search.cpan.org/dist/mime-construct/
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -28,64 +32,29 @@
 
 %prep
 %setup -q -n mime-construct-%{version}
-chmod -R u+w %{_builddir}/mime-construct-%{version}
 
 %build
-grep -rsl '^#!.*perl' . |
-grep -v '.bak$' |xargs --no-run-if-empty \
-%__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
-%{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=$RPM_BUILD_ROOT%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
+%{__perl} Makefile.PL \
+	INSTALLDIRS=vendor
+
 %{__make}
-%{__make} test
+
+%{?with_tests:%{__make} test}
 
 %install
-mkdir -p $RPM_BUILD_ROOT
-%{__make} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=$RPM_BUILD_ROOT%{_prefix}| : qq|DESTDIR=$RPM_BUILD_ROOT| '`
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
 
-# remove special files
-find $RPM_BUILD_ROOT -name "perllocal.pod" \
-    -o -name ".packlist"                \
-    -o -name "*.bs"                     \
-    |xargs -i rm -f {}
-
-%{__perl} -MFile::Find -le '
-    find({ wanted => \&wanted, no_chdir => 1}, "$RPM_BUILD_ROOT");
-    print "%defattr(-,root,root)";
-    print "%doc  debian README";
-    for my $x (sort @dirs, @files) {
-        push @ret, $x unless indirs($x);
-        }
-    print join "\n", sort @ret;
-
-    sub wanted {
-        return if /auto$/;
-
-        local $_ = $File::Find::name;
-        my $f = $_; s|^$RPM_BUILD_ROOT||;
-        return unless length;
-        return $files[@files] = $_ if -f $f;
-
-        $d = $_;
-        /\Q$d\E/ && return for reverse sort @INC;
-        $d =~ /\Q$_\E/ && return
-for qw|%{_sysconfdir} %_prefix/man %_prefix/bin %_prefix/share|;
-
-        $dirs[@dirs] = $_;
-        }
-
-    sub indirs {
-        my $x = shift;
-        $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
-        }
-    ' > %filelist
-
-[ -z %filelist ] && {
-    echo "ERROR: empty %files listing"
-    exit -1
-    }
+%clean
+rm -rf $RPM_BUILD_ROOT
 
-%files -f %filelist
+%files
 %defattr(644,root,root,755)
+%doc README debian/changelog
+%attr(755,root,root) %{_bindir}/mime-construct
+%{_mandir}/man1/mime-construct.1*
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -93,6 +62,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2005/10/05 19:17:17  qboosh
+- more cleanups, now looks like PLD perl-* spec
+
 Revision 1.2  2005/10/05 19:10:28  qboosh
 - pl, some cleanups
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/perl-mime-construct.spec?r1=1.2&r2=1.3&f=u




More information about the pld-cvs-commit mailing list