Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
michael@22 | 1 | ## |
michael@22 | 2 | ## perl.spec -- OpenPKG RPM Package Specification |
michael@501 | 3 | ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@22 | 4 | ## |
michael@22 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@22 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@22 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@22 | 8 | ## copies. |
michael@22 | 9 | ## |
michael@22 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@22 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@22 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@22 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@22 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@22 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@22 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@22 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@22 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@22 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@22 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@22 | 21 | ## SUCH DAMAGE. |
michael@22 | 22 | ## |
michael@22 | 23 | |
michael@22 | 24 | # package information |
michael@22 | 25 | Name: perl |
michael@22 | 26 | Summary: Practical Extraction and Reporting Language |
michael@22 | 27 | URL: http://www.perl.com/ |
michael@22 | 28 | Vendor: The Perl Project |
michael@22 | 29 | Packager: OpenPKG Foundation e.V. |
michael@22 | 30 | Distribution: OpenPKG Community |
michael@22 | 31 | Class: CORE |
michael@22 | 32 | Group: Perl |
michael@22 | 33 | License: GPL/Artistic |
michael@639 | 34 | Version: 5.16.1 |
michael@502 | 35 | Release: 20120800 |
michael@22 | 36 | |
michael@22 | 37 | # list of sources |
michael@358 | 38 | Source0: http://www.cpan.org/src/perl-%{version}.tar.gz |
michael@22 | 39 | Patch0: perl.patch |
michael@22 | 40 | |
michael@22 | 41 | # build information |
michael@502 | 42 | BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make |
michael@501 | 43 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@22 | 44 | |
michael@22 | 45 | %description |
michael@22 | 46 | Perl ("Practical Reporting and Extraction Language") is a very |
michael@22 | 47 | sophisticated and flexible (but this way also complex) programming |
michael@22 | 48 | language. This is the original implementation of the Perl 5 |
michael@22 | 49 | interpreter from Larry Wall and his community. |
michael@22 | 50 | |
michael@22 | 51 | %track |
michael@22 | 52 | prog perl = { |
michael@22 | 53 | version = %{version} |
michael@358 | 54 | url = http://www.cpan.org/src/ |
michael@358 | 55 | regex = perl-(5\.(?:[02468]|1[02468])\.\d+)\.tar\.gz |
michael@22 | 56 | } |
michael@22 | 57 | |
michael@22 | 58 | %prep |
michael@22 | 59 | %setup -q |
michael@22 | 60 | %patch -p0 |
michael@22 | 61 | chmod -R u+w . |
michael@22 | 62 | |
michael@22 | 63 | %build |
michael@22 | 64 | # configure the Perl package |
michael@22 | 65 | %{l_shtool} subst \ |
michael@22 | 66 | -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 | 67 | -e 's;package=perl5;package=perl;' \ |
michael@22 | 68 | Configure |
michael@22 | 69 | %{l_shtool} subst \ |
michael@22 | 70 | -e 's; */usr/local/lib;;' \ |
michael@22 | 71 | hints/freebsd.sh hints/netbsd.sh |
michael@22 | 72 | optimize="" |
michael@22 | 73 | case "%{l_platform -t}" in |
michael@22 | 74 | amd64-* ) optimize="%{l_cflags}" ;; |
michael@22 | 75 | *-aix* ) optimize="%{l_cflags}" ;; |
michael@22 | 76 | *-* ) optimize="%{l_cflags -O}" ;; |
michael@22 | 77 | esac |
michael@22 | 78 | if [ ".$optimize" = . ]; then |
michael@22 | 79 | optimize="-Uoptimize" |
michael@22 | 80 | else |
michael@22 | 81 | optimize="-Doptimize=$optimize" |
michael@22 | 82 | fi |
michael@22 | 83 | libdirs="" |
michael@22 | 84 | for dir in %{l_prefix}/lib /lib64 /usr/lib64 /lib /usr/lib /usr/ccs/lib; do |
michael@22 | 85 | if [ -d $dir ]; then |
michael@22 | 86 | if [ ".$libdirs" = . ]; then |
michael@22 | 87 | libdirs="$dir" |
michael@22 | 88 | else |
michael@22 | 89 | libdirs="$libdirs $dir" |
michael@22 | 90 | fi |
michael@22 | 91 | fi |
michael@22 | 92 | done |
michael@22 | 93 | ./Configure \ |
michael@22 | 94 | -d -e -s \ |
michael@22 | 95 | -Dcf_by="%{l_openpkg_release}" \ |
michael@22 | 96 | -Dcf_email="http://www.openpkg.org/" \ |
michael@22 | 97 | -Dprefix=%{l_prefix} \ |
michael@22 | 98 | -Dvendorprefix=%{l_prefix} \ |
michael@22 | 99 | -Dinstallprefix=%{l_prefix} \ |
michael@22 | 100 | -Dinstallstyle="lib/perl5" \ |
michael@22 | 101 | -Dman1dir=%{l_prefix}/man/man1 \ |
michael@22 | 102 | -Dman3dir=%{l_prefix}/man/man3 \ |
michael@22 | 103 | -Dcc="%{l_prefix}/bin/gcc" "$optimize" \ |
michael@22 | 104 | -Dlocincpth="%{l_prefix}/include" \ |
michael@22 | 105 | -Dloclibpth="%{l_prefix}/lib" \ |
michael@22 | 106 | -Dldflags="%{l_ldflags}" \ |
michael@22 | 107 | -Dlibpth="$libdirs" \ |
michael@22 | 108 | -Dglibpth="$libdirs" \ |
michael@22 | 109 | -Dscriptdir="%{l_prefix}/bin" \ |
michael@22 | 110 | -Uinstallusrbinperl \ |
michael@22 | 111 | -Ui_malloc -Ui_iconv -Ui_db \ |
michael@22 | 112 | -Uusedevel |
michael@22 | 113 | |
michael@22 | 114 | # build the Perl package |
michael@502 | 115 | %{l_make} %{l_mflags -O} -f Makefile |
michael@22 | 116 | |
michael@22 | 117 | %install |
michael@22 | 118 | |
michael@22 | 119 | # install the Perl package via standard procedure |
michael@22 | 120 | %{l_make} %{l_mflags} -f Makefile install DESTDIR=$RPM_BUILD_ROOT |
michael@22 | 121 | |
michael@22 | 122 | # allow us to already use the temporary install perl(1) |
michael@22 | 123 | PERL5LIB=$RPM_BUILD_ROOT%{l_prefix}/lib/perl |
michael@22 | 124 | export PERL5LIB |
michael@22 | 125 | |
michael@22 | 126 | # install Perl versions of system header files |
michael@22 | 127 | ( case "%{l_platform -t}" in |
michael@22 | 128 | *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;; |
michael@22 | 129 | esac |
michael@22 | 130 | cd /usr/include |
michael@22 | 131 | eval `$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installarchlib` |
michael@22 | 132 | echo *.h sys/*.h |\ |
michael@22 | 133 | xargs $RPM_BUILD_ROOT%{l_prefix}/bin/perl \ |
michael@22 | 134 | $RPM_BUILD_ROOT%{l_prefix}/bin/h2ph -h -d $RPM_BUILD_ROOT$installarchlib |
michael@22 | 135 | ) || exit $? |
michael@22 | 136 | |
michael@22 | 137 | # post-adjustments to installation tree |
michael@22 | 138 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/perl%{version} |
michael@22 | 139 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3 |
michael@22 | 140 | for name in \ |
michael@22 | 141 | libnetcfg perlaix perlamiga perlapollo \ |
michael@22 | 142 | perlbeos perlbs2000 perlcygwin perldgux perlepoc perlfreebsd perlhpux \ |
michael@22 | 143 | perlhurd perlirix perlmachten perlmacos perlmacosx perlmint perlmpeix \ |
michael@22 | 144 | perlnetware perlos2 perlos390 perlos400 perlplan9 perlqnx perlsolaris \ |
michael@22 | 145 | perlvmesa perlvms perlvos perlwin32; do |
michael@22 | 146 | rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/$name.1 |
michael@22 | 147 | done |
michael@22 | 148 | |
michael@22 | 149 | # re-adjust configuration as mentioned in Perl's INSTALL document |
michael@22 | 150 | ( case "%{l_platform -t}" in |
michael@22 | 151 | *-darwin* ) export DYLD_LIBRARY_PATH="`pwd`" ;; |
michael@22 | 152 | esac |
michael@22 | 153 | $RPM_BUILD_ROOT%{l_prefix}/bin/perl -pi.orig \ |
michael@22 | 154 | -e "s:$RPM_BUILD_ROOT%{l_prefix}:%{l_prefix}:g" \ |
michael@22 | 155 | $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/*/Config.pm \ |
michael@22 | 156 | `find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/%{version}/ \ |
michael@22 | 157 | -type f -name ".packlist" -print` |
michael@22 | 158 | find $RPM_BUILD_ROOT%{l_prefix}/lib/perl/ \ |
michael@22 | 159 | -name "*.orig" -print | xargs rm -f |
michael@22 | 160 | ) || exit $? |
michael@22 | 161 | |
michael@22 | 162 | # assume ownership for various arch/site/vendor install dirs |
michael@22 | 163 | ( eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installarchlib`" |
michael@22 | 164 | eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installprivlib`" |
michael@22 | 165 | eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installsitearch`" |
michael@22 | 166 | eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installsitelib`" |
michael@22 | 167 | eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installvendorarch`" |
michael@22 | 168 | eval "`$RPM_BUILD_ROOT%{l_prefix}/bin/perl -V:installvendorlib`" |
michael@22 | 169 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@22 | 170 | $RPM_BUILD_ROOT$installarchlib/auto \ |
michael@22 | 171 | $RPM_BUILD_ROOT$installprivlib/auto \ |
michael@22 | 172 | $RPM_BUILD_ROOT$installsitearch/auto \ |
michael@22 | 173 | $RPM_BUILD_ROOT$installsitelib/auto \ |
michael@22 | 174 | $RPM_BUILD_ROOT$installvendorarch/auto \ |
michael@22 | 175 | $RPM_BUILD_ROOT$installvendorlib/auto |
michael@22 | 176 | ) || exit $? |
michael@22 | 177 | |
michael@22 | 178 | # strip binary files |
michael@22 | 179 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* 2>/dev/null || true |
michael@22 | 180 | |
michael@22 | 181 | # resolve file conflicts (with perl-locale) |
michael@22 | 182 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/enc2xs \ |
michael@358 | 183 | $RPM_BUILD_ROOT%{l_prefix}/bin/piconv \ |
michael@358 | 184 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/enc2xs.1 \ |
michael@358 | 185 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/piconv.1 |
michael@22 | 186 | |
michael@22 | 187 | # resolve file conflicts (with perl-module) |
michael@22 | 188 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/corelist \ |
michael@22 | 189 | $RPM_BUILD_ROOT%{l_prefix}/bin/config_data \ |
michael@358 | 190 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/config_data.1 \ |
michael@358 | 191 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/corelist.1 \ |
michael@358 | 192 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/cpan.1 \ |
michael@358 | 193 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/instmodsh.1 |
michael@22 | 194 | |
michael@22 | 195 | # resolve file conflicts (with perl-sys) |
michael@22 | 196 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/ptar \ |
michael@22 | 197 | $RPM_BUILD_ROOT%{l_prefix}/bin/ptardiff \ |
michael@501 | 198 | $RPM_BUILD_ROOT%{l_prefix}/bin/ptargrep \ |
michael@22 | 199 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/ptar.1 \ |
michael@501 | 200 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/ptardiff.1 \ |
michael@501 | 201 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/ptargrep.1 |
michael@22 | 202 | |
michael@22 | 203 | # resolve file conflicts (with perl-crypto) |
michael@22 | 204 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/shasum \ |
michael@22 | 205 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/shasum.1 |
michael@22 | 206 | |
michael@501 | 207 | # resolve file conflicts (with perl-comp) |
michael@501 | 208 | rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/zipdetails \ |
michael@501 | 209 | $RPM_BUILD_ROOT%{l_prefix}/man/man1/zipdetails.1 |
michael@501 | 210 | |
michael@22 | 211 | # determine installed files |
michael@22 | 212 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} |
michael@22 | 213 | |
michael@22 | 214 | %files -f files |
michael@22 | 215 | |
michael@22 | 216 | %clean |
michael@22 | 217 |