[3934] | 1 | # if you wanna test, add " --define '_run_test 1' " option to rpmbuild command |
---|
| 2 | %define run_test %{?_run_test:1}%{!?_run_test:0} |
---|
[521] | 3 | %define pkgname Tk |
---|
| 4 | |
---|
| 5 | Summary: A perl module for Tk. |
---|
| 6 | Name: perl-%{pkgname} |
---|
| 7 | Version: 804.028 |
---|
[3936] | 8 | Release: 5%{_dist_release} |
---|
[521] | 9 | Group: Development/Libraries |
---|
| 10 | License: GPL or Artistic |
---|
| 11 | URL: http://perltk.org/ |
---|
| 12 | Source0: %{pkgname}-%{version}.tar.gz |
---|
| 13 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[3936] | 14 | BuildRequires: libX11-devel |
---|
| 15 | BuildRequires: libpng-devel |
---|
| 16 | BuildRequires: libjpeg-turbo-devel |
---|
[521] | 17 | |
---|
[821] | 18 | ## bug fix |
---|
| 19 | # fixed: http://rt.cpan.org/Public/Bug/Display.html?id=38746 |
---|
| 20 | Patch11: perl-Tk-fix38746.patch |
---|
| 21 | |
---|
| 22 | ## security fix |
---|
[521] | 23 | Patch100: Tk-804.027-suse-CVE-2006-4484.patch |
---|
| 24 | |
---|
[3934] | 25 | ## for VineLinux6 |
---|
| 26 | Patch200: perl-Tk-804.028.Xlib.patch |
---|
| 27 | Patch201: perl-Tk-804.028.pTkCallback.patch |
---|
| 28 | Patch202: perl-Tk-804.028.encGlue.patch |
---|
| 29 | Patch203: perl-Tk-804.028.tkGlue.patch |
---|
| 30 | |
---|
| 31 | |
---|
[521] | 32 | Provides: perl(Tk::LabRadio) = 4.004 |
---|
| 33 | Provides: perl(Tk::TextReindex) = 4.004 |
---|
| 34 | |
---|
| 35 | Vendor: Project Vine |
---|
| 36 | Distribution: Vine Linux |
---|
| 37 | |
---|
| 38 | %description |
---|
| 39 | Perl bindings to the Tk Graphical User Interface ToolKit. |
---|
| 40 | |
---|
| 41 | %prep |
---|
| 42 | %setup -q -n %{pkgname}-%{version} |
---|
[821] | 43 | %{__mkdir} pTk.docs |
---|
| 44 | %{__cp} pTk/Tix.license pTk/license.terms pTk/license.html_lib pTk.docs |
---|
[521] | 45 | |
---|
[821] | 46 | ## bug fix |
---|
| 47 | %patch11 -p0 -b .bug38746 |
---|
| 48 | |
---|
| 49 | ## security fix |
---|
[521] | 50 | %patch100 -p0 -b .CVE-2006-4484 |
---|
| 51 | |
---|
[3934] | 52 | ## for VineLinux6 |
---|
| 53 | %patch200 -p1 -b .Xlib |
---|
| 54 | %patch201 -p1 -b .pTkCallback |
---|
| 55 | %patch202 -p1 -b .encGlue |
---|
| 56 | %patch203 -p1 -b .tkGlue |
---|
| 57 | |
---|
[521] | 58 | %build |
---|
| 59 | find . -type f -exec %{__perl} -pi -e 's|^#!/.*bin/perl\S*|#!%{__perl}|i;' {} \; |
---|
| 60 | CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{_prefix} INSTALLDIRS=vendor |
---|
[3936] | 61 | #make %{?_smp_mflags} |
---|
| 62 | make |
---|
[521] | 63 | |
---|
[3934] | 64 | %if %{run_test} |
---|
| 65 | make test |
---|
| 66 | #-------------------------------# |
---|
| 67 | # Sun May 22 2011 ..last tested # |
---|
| 68 | # Result: PASS |
---|
| 69 | #-------------------------------# |
---|
| 70 | %endif |
---|
| 71 | |
---|
| 72 | |
---|
[521] | 73 | %install |
---|
| 74 | rm -rf $RPM_BUILD_ROOT |
---|
| 75 | make install |
---|
| 76 | |
---|
| 77 | [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress |
---|
| 78 | |
---|
| 79 | find $RPM_BUILD_ROOT%{_prefix} -type f -print | \ |
---|
| 80 | sed "s@^$RPM_BUILD_ROOT@@g" | \ |
---|
| 81 | grep -v perllocal.pod | \ |
---|
| 82 | grep -v "\.packlist" > %{pkgname}-%{version}-filelist |
---|
| 83 | if [ "$(cat %{pkgname}-%{version}-filelist)X" = "X" ] ; then |
---|
| 84 | echo "ERROR: EMPTY FILE LIST" |
---|
| 85 | exit -1 |
---|
| 86 | fi |
---|
| 87 | |
---|
| 88 | %clean |
---|
| 89 | rm -rf $RPM_BUILD_ROOT |
---|
| 90 | |
---|
| 91 | %files -f %{pkgname}-%{version}-filelist |
---|
| 92 | %defattr(-,root,root) |
---|
[821] | 93 | %doc README MANIFEST COPYING Change.log Changes README.linux pTk.docs |
---|
[3934] | 94 | %exclude %{perl_archlib}/perllocal.pod |
---|
| 95 | %exclude %{perl_vendorarch}/auto/Tk/.packlist |
---|
[521] | 96 | |
---|
[3934] | 97 | |
---|
[521] | 98 | %changelog |
---|
[3936] | 99 | * Sun May 22 2011 Shu KONNO <owa@bg.wakwak.com> 804.028-5 |
---|
| 100 | - added BR: libjpeg-turbo-devel |
---|
| 101 | |
---|
[3934] | 102 | * Sun May 22 2011 Shu KONNO <owa@bg.wakwak.com> 804.028-4 |
---|
| 103 | - added Patch200: perl-Tk-804.028.Xlib.patch |
---|
| 104 | - added Patch201: perl-Tk-804.028.pTkCallback.patch |
---|
| 105 | - added Patch202: perl-Tk-804.028.encGlue.patch |
---|
| 106 | - added Patch203: perl-Tk-804.028.tkGlue.patch |
---|
| 107 | - added _run_test option |
---|
| 108 | |
---|
[821] | 109 | * Sat Jan 9 2010 IWAI, Masaharu <iwai@alib.jp> 804.028-3 |
---|
| 110 | - add BuildRequires: libX11-devel libpng-devel : <BTS:VineLinux:866> |
---|
| 111 | - drop X11LIBS argument for Makefile.PL on x86_64 architecture |
---|
| 112 | - add documents |
---|
| 113 | |
---|
| 114 | * Mon Jan 4 2010 IWAI, Masaharu <iwai@alib.jp> 804.028-2 |
---|
| 115 | - add patch11 for fix CPAN bug #38746: <BTS:VineLinux:866> |
---|
| 116 | - see http://rt.cpan.org/Public/Bug/Display.html?id=38746 |
---|
| 117 | |
---|
[521] | 118 | * Sun Aug 24 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 804.028-1 |
---|
| 119 | - new upstream release |
---|
| 120 | - build with perl-8.10.0 |
---|
| 121 | |
---|
| 122 | * Fri Mar 28 2008 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 804.027-3 |
---|
| 123 | - add patch100 for fix CVE-2006-4484 |
---|
| 124 | - with new versioning policy |
---|
| 125 | - add Vendor/Distribution tag |
---|
| 126 | |
---|
| 127 | * Mon Dec 31 2007 Shu KONNO <owa@bg.wakwak.com> 804.027-0vl2 |
---|
| 128 | - added X11LIB to build (for x86_64) |
---|
| 129 | |
---|
| 130 | * Sun Oct 22 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 804.027-0vl1 |
---|
| 131 | - updated to 804.027 |
---|
| 132 | - build with perl-5.8.6 |
---|
| 133 | - no noarch now (arch-dependent files/binaries are actually included) |
---|
| 134 | |
---|
| 135 | * Sun Oct 03 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 804.026-0vl1 |
---|
| 136 | - initial build for Vine Linux |
---|
| 137 | |
---|