]> git.pld-linux.org Git - packages/perl-mime-construct.git/commitdiff
- more cleanups, now looks like PLD perl-* spec
authorJakub Bogusz <qboosh@pld-linux.org>
Wed, 5 Oct 2005 19:17:17 +0000 (19:17 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    perl-mime-construct.spec -> 1.3

perl-mime-construct.spec

index 6c690bd82e2e847e49d5e94869b5afe7d2572ee6..4a33da0b7bde215e3e988f3b698ce98b94f3f38a 100644 (file)
@@ -1,16 +1,20 @@
-
-%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@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)
 
@@ -27,61 +31,26 @@ programy.
 
 %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]/ '`
-%{__make}
-%{__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| '`
+%{__perl} Makefile.PL \
+       INSTALLDIRS=vendor
 
-# 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;
+%{__make}
 
-        $d = $_;
-        /\Q$d\E/ && return for reverse sort @INC;
-        $d =~ /\Q$_\E/ && return
-for qw|%{_sysconfdir} %_prefix/man %_prefix/bin %_prefix/share|;
+%{?with_tests:%{__make} test}
 
-        $dirs[@dirs] = $_;
-        }
+%install
+rm -rf $RPM_BUILD_ROOT
 
-    sub indirs {
-        my $x = shift;
-        $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
-        }
-    ' > %filelist
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
 
-[ -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*
This page took 0.434426 seconds and 4 git commands to generate.