michael@22: ## michael@22: ## perl.spec -- OpenPKG RPM Package Specification michael@358: ## Copyright (c) 2000-2011 OpenPKG Foundation e.V. michael@22: ## michael@22: ## Permission to use, copy, modify, and distribute this software for michael@22: ## any purpose with or without fee is hereby granted, provided that michael@22: ## the above copyright notice and this permission notice appear in all michael@22: ## copies. michael@22: ## michael@22: ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED michael@22: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF michael@22: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. michael@22: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR michael@22: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, michael@22: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT michael@22: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF michael@22: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND michael@22: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, michael@22: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT michael@22: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF michael@22: ## SUCH DAMAGE. michael@22: ## michael@22: michael@22: # package information michael@22: Name: perl michael@22: Summary: Practical Extraction and Reporting Language michael@22: URL: http://www.perl.com/ michael@22: Vendor: The Perl Project michael@22: Packager: OpenPKG Foundation e.V. michael@22: Distribution: OpenPKG Community michael@22: Class: CORE michael@22: Group: Perl michael@22: License: GPL/Artistic michael@358: Version: 5.14.1 michael@359: Release: 20110914 michael@22: michael@22: # list of sources michael@358: Source0: http://www.cpan.org/src/perl-%{version}.tar.gz michael@22: Patch0: perl.patch michael@22: michael@22: # build information michael@359: Prefix: %{l_prefix} michael@359: BuildRoot: %{l_buildroot} michael@359: BuildPreReq: OpenPKG, openpkg >= 20060823, gcc michael@359: PreReq: OpenPKG, openpkg >= 20060823 michael@359: AutoReq: no michael@359: AutoReqProv: no michael@22: michael@22: %description michael@22: Perl ("Practical Reporting and Extraction Language") is a very michael@22: sophisticated and flexible (but this way also complex) programming michael@22: language. This is the original implementation of the Perl 5 michael@22: interpreter from Larry Wall and his community. michael@22: michael@22: %track michael@22: prog perl = { michael@22: version = %{version} michael@358: url = http://www.cpan.org/src/ michael@358: regex = perl-(5\.(?:[02468]|1[02468])\.\d+)\.tar\.gz michael@22: } michael@22: michael@22: %prep michael@22: %setup -q michael@22: %patch -p0 michael@22: chmod -R u+w . michael@22: michael@22: %build michael@22: # configure the Perl package michael@22: %{l_shtool} subst \ michael@22: -e 's;\(.*for thislib in $libswanted.*\);libswanted=`echo " $libswanted " | sed -e "s/ bind / /g" -e "s/ db / /g" -e "s/ gdbm / /g" -e "s/ iconv / /g"`\; \1;' \ michael@22: -e 's;package=perl5;package=perl;' \ michael@22: Configure michael@22: %{l_shtool} subst \ michael@22: -e 's; */usr/local/lib;;' \ michael@22: hints/freebsd.sh hints/netbsd.sh michael@22: optimize="" michael@22: case "%{l_platform -t}" in michael@22: amd64-* ) optimize="%{l_cflags}" ;; michael@22: *-aix* ) optimize="%{l_cflags}" ;; michael@22: *-* ) optimize="%{l_cflags -O}" ;; michael@22: esac michael@22: if [ ".$optimize" = . ]; then michael@22: optimize="-Uoptimize" michael@22: else michael@22: optimize="-Doptimize=$optimize" michael@22: fi michael@22: libdirs="" michael@22: for dir in %{l_prefix}/lib /lib64 /usr/lib64 /lib /usr/lib /usr/ccs/lib; do michael@22: if [ -d $dir ]; then michael@22: if [ ".$libdirs" = . ]; then michael@22: libdirs="$dir" michael@22: else michael@22: libdirs="$libdirs $dir" michael@22: fi michael@22: fi michael@22: done michael@22: ./Configure \ michael@22: -d -e -s \ michael@22: -Dcf_by="%{l_openpkg_release}" \ michael@22: -Dcf_email="http://www.openpkg.org/" \ michael@22: -Dprefix=%{l_prefix} \ michael@22: -Dvendorprefix=%{l_prefix} \ michael@22: -Dinstallprefix=%{l_prefix} \ michael@22: -Dinstallstyle="lib/perl5" \ michael@22: -Dman1dir=%{l_prefix}/man/man1 \ michael@22: -Dman3dir=%{l_prefix}/man/man3 \ michael@22: -Dcc="%{l_prefix}/bin/gcc" "$optimize" \ michael@22: -Dlocincpth="%{l_prefix}/include" \ michael@22: -Dloclibpth="%{l_prefix}/lib" \ michael@22: -Dldflags="%{l_ldflags}" \ michael@22: -Dlibpth="$libdirs" \ michael@22: -Dglibpth="$libdirs" \ michael@22: -Dscriptdir="%{l_prefix}/bin" \ michael@22: -Uinstallusrbinperl \ michael@22: -Ui_malloc -Ui_iconv -Ui_db \ michael@22: -Uusedevel michael@22: michael@22: # build the Perl package michael@22: %{l_make} %{l_mflags} -f Makefile michael@22: michael@22: %install michael@359: # remove build cruft michael@359: rm -rf $RPM_BUILD_ROOT michael@22: michael@22: # install the Perl package via standard procedure michael@22: %{l_make} %{l_mflags} -f Makefile install DESTDIR=$RPM_BUILD_ROOT michael@22: michael@22: # allow us to already use the temporary install perl(1) michael@22: PERL5LIB=$RPM_BUILD_ROOT%{l_prefix}/lib/perl michael@22: export PERL5LIB michael@22: michael@22: # install Perl versions of system header files michael@22: ( case "%{l_platform -t}" in michael@22: *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;; michael@22: esac michael@22: cd /usr/include michael@22: eval `$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installarchlib` michael@22: echo *.h sys/*.h |\ michael@22: xargs $RPM_BUILD_ROOT%{l_prefix}/bin/perl \ michael@22: $RPM_BUILD_ROOT%{l_prefix}/bin/h2ph -h -d $RPM_BUILD_ROOT$installarchlib michael@22: ) || exit $? michael@22: michael@22: # post-adjustments to installation tree michael@22: rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version} michael@22: rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3 michael@22: for name in \ michael@22: libnetcfg perlaix perlamiga perlapollo \ michael@22: perlbeos perlbs2000 perlcygwin perldgux perlepoc perlfreebsd perlhpux \ michael@22: perlhurd perlirix perlmachten perlmacos perlmacosx perlmint perlmpeix \ michael@22: perlnetware perlos2 perlos390 perlos400 perlplan9 perlqnx perlsolaris \ michael@22: perlvmesa perlvms perlvos perlwin32; do michael@22: rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$name.1 michael@22: done michael@22: michael@22: # re-adjust configuration as mentioned in Perl's INSTALL document michael@22: ( case "%{l_platform -t}" in michael@22: *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;; michael@22: esac michael@22: $RPM_BUILD_ROOT%{l_prefix}/bin/perl -pi.orig \ michael@22: -e "s:$RPM_BUILD_ROOT%{l_prefix}:%{l_prefix}:g" \ michael@22: $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/*/Config.pm \ michael@22: `find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/ \ michael@22: -type f -name ".packlist" -print` michael@22: find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/ \ michael@22: -name "*.orig" -print | xargs rm -f michael@22: ) || exit $? michael@22: michael@22: # assume ownership for various arch/site/vendor install dirs michael@22: ( eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installarchlib`" michael@22: eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installprivlib`" michael@22: eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installsitearch`" michael@22: eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installsitelib`" michael@22: eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installvendorarch`" michael@22: eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installvendorlib`" michael@22: %{l_shtool} mkdir -f -p -m 755 \ michael@22: $RPM_BUILD_ROOT$installarchlib/auto \ michael@22: $RPM_BUILD_ROOT$installprivlib/auto \ michael@22: $RPM_BUILD_ROOT$installsitearch/auto \ michael@22: $RPM_BUILD_ROOT$installsitelib/auto \ michael@22: $RPM_BUILD_ROOT$installvendorarch/auto \ michael@22: $RPM_BUILD_ROOT$installvendorlib/auto michael@22: ) || exit $? michael@22: michael@22: # strip binary files michael@22: strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true michael@22: michael@22: # resolve file conflicts (with perl-locale) michael@22: rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/enc2xs \ michael@358: $RPM_BUILD_ROOT%{l_prefix}/bin/piconv \ michael@358: $RPM_BUILD_ROOT%{l_prefix}/man/man1/enc2xs.1 \ michael@358: $RPM_BUILD_ROOT%{l_prefix}/man/man1/piconv.1 michael@22: michael@22: # resolve file conflicts (with perl-module) michael@22: rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/corelist \ michael@22: $RPM_BUILD_ROOT%{l_prefix}/bin/config_data \ michael@358: $RPM_BUILD_ROOT%{l_prefix}/man/man1/config_data.1 \ michael@358: $RPM_BUILD_ROOT%{l_prefix}/man/man1/corelist.1 \ michael@358: $RPM_BUILD_ROOT%{l_prefix}/man/man1/cpan.1 \ michael@358: $RPM_BUILD_ROOT%{l_prefix}/man/man1/instmodsh.1 michael@22: michael@22: # resolve file conflicts (with perl-sys) michael@22: rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ptar \ michael@22: $RPM_BUILD_ROOT%{l_prefix}/bin/ptardiff \ michael@22: $RPM_BUILD_ROOT%{l_prefix}/man/man1/ptar.1 \ michael@22: $RPM_BUILD_ROOT%{l_prefix}/man/man1/ptardiff.1 michael@22: michael@22: # resolve file conflicts (with perl-crypto) michael@22: rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/shasum \ michael@22: $RPM_BUILD_ROOT%{l_prefix}/man/man1/shasum.1 michael@22: michael@22: # determine installed files michael@22: %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} michael@22: michael@22: %files -f files michael@22: michael@22: %clean michael@359: rm -rf $RPM_BUILD_ROOT michael@22: