]> git.pld-linux.org Git - projects/template-specs.git/blobdiff - perl.spec
- adjusted noarch subpackage rules and some descriptions, more pl
[projects/template-specs.git] / perl.spec
index 0124fa3e8dc433a81507f9b147ff14d68a9757b0..32b9c04b96886a5bd79de301207c5ae81d6b0082 100644 (file)
--- a/perl.spec
+++ b/perl.spec
@@ -1,27 +1,34 @@
 #
+############################################################
+#
+# NOTE
+# - use the SOURCES/pldcpan.pl script for new perl packages
+#   also available in pldcpan package.
+#
+############################################################
+#
 # Conditional build:
 %bcond_without tests   # do not perform "make test"
 #
-%include       /usr/lib/rpm/macros.perl
-%define                pdir    -
-%define                pnam    -
+%define                pdir    PDIR
+%define                pnam    PNAM
 Summary:       -
-Summary(de):   -
-Summary(es):   -
-Summary(fr):   -
-Summary(pl):   -
-Summary(ru):   -
-Name:          perl-
+Summary(pl.UTF-8):     -
+Name:          perl-PDIR-PNAM
 Version:       -
 Release:       -
 # note if it is "same as perl"
+#License:      GPL v1+ or Artistic
 License:       (enter GPL/LGPL/BSD/BSD-like/Artistic/other license name here)
 Group:         Development/Languages/Perl
-Source0:       http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
-Patch0:                %{name}
-URL:           -
+Source0:       http://www.cpan.org/modules/by-module/PDIR/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: 
+Patch0:                %{name}-foo.patch
+# most of CPAN modules have generic URL (substitute pdir and pnam here)
+URL:           https://metacpan.org/release/PDIR-PNAM
 BuildRequires: perl-devel >= 1:5.8.0
 BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: rpmbuild(macros) >= 1.745
 BuildRequires: -
 %if %{with tests}
 BuildRequires: perl-
@@ -33,32 +40,40 @@ Obsoletes:  -
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _noautoreq      'perl(anything_fake_or_conditional)'
+%define                _noautoreq_perl anything_fake_or_conditional
 
 %description
 
-%description -l de
-
-%description -l es
-
-%description -l fr
-
-%description -l pl
-
-%description -l ru
+%description -l pl.UTF-8
 
 %prep
 %setup -q -n %{pdir}-%{pnam}-%{version}
 %patch0 -p1
 
+# fix #!/usr/bin/env perl -w -> #!/usr/bin/perl:
+%{__sed} -i -e '1s,^#!.*perl,#!%{__perl},' tofu
+
 %build
 # Don't use pipes here: they generally don't work. Apply a patch.
 %{__perl} Makefile.PL \
        INSTALLDIRS=vendor
 
+# Build.PL based packages
+%{__perl} Build.PL \
+       perl=%{__perl} \
+       installdirs=vendor
+./Build
+
 %{__make}
 # if module isn't noarch, use:
 # %{__make} \
+#      CC="%{__cc}"
+#      OPTIMIZE="%{rpmcflags}"
+
+# for C++ programs, use also CC but specify __cxx:
+# NOTE: (this) Perl build system doesn't have CXX, but CC is used
+#%{__make} \
+#      CC="%{__cxx}" \
 #      OPTIMIZE="%{rpmcflags}"
 
 %{?with_tests:%{__make} test}
@@ -66,16 +81,20 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} pure_install \
        DESTDIR=$RPM_BUILD_ROOT
 
+./Build install \
+       destdir=$RPM_BUILD_ROOT
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
 %doc Changes README
+# NOTE it's mostly easier to copy unpackaged filelist here, and run adapter over the spec.
 # use macros:
-#%%{perl_vendorlib}/...
-#%%{perl_vendorarch}/...
+#%%{perl_vendorlib}/PDIR...
+#%%{perl_vendorarch}/PDIR...
 %{_mandir}/man3/*
This page took 0.054795 seconds and 4 git commands to generate.