[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} |
---|
[8731] | 7 | Version: 804.032 |
---|
| 8 | Release: 1%{_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 |
---|
[8731] | 17 | Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) |
---|
[521] | 18 | |
---|
[8731] | 19 | Patch0: perl-Tk-widget.patch |
---|
| 20 | # modified version of http://ftp.de.debian.org/debian/pool/main/p/perl-tk/perl-tk_804.027-8.diff.gz |
---|
| 21 | Patch1: perl-Tk-debian.patch.gz |
---|
| 22 | # fix segfaults as in #235666 because of broken cashing code |
---|
| 23 | Patch2: perl-Tk-seg.patch |
---|
| 24 | # Fix freetype detection with 2.5 |
---|
| 25 | Patch4: perl-Tk-freetype25.patch |
---|
[821] | 26 | |
---|
[521] | 27 | Provides: perl(Tk::LabRadio) = 4.004 |
---|
| 28 | Provides: perl(Tk::TextReindex) = 4.004 |
---|
| 29 | |
---|
| 30 | Vendor: Project Vine |
---|
| 31 | Distribution: Vine Linux |
---|
| 32 | |
---|
| 33 | %description |
---|
| 34 | Perl bindings to the Tk Graphical User Interface ToolKit. |
---|
| 35 | |
---|
| 36 | %prep |
---|
| 37 | %setup -q -n %{pkgname}-%{version} |
---|
[821] | 38 | %{__mkdir} pTk.docs |
---|
| 39 | %{__cp} pTk/Tix.license pTk/license.terms pTk/license.html_lib pTk.docs |
---|
[521] | 40 | |
---|
[8731] | 41 | # fix for widget as docs |
---|
| 42 | %patch0 |
---|
| 43 | %{__perl} -pi -e \ |
---|
| 44 | 's,\@demopath\@,%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}/demo |
---|
| 45 | s,g' demos/widget |
---|
| 46 | # debian patch |
---|
| 47 | %patch1 -p1 |
---|
| 48 | # patch to fix #235666 ... seems like caching code is broken |
---|
| 49 | %patch2 -p1 -b .seg |
---|
| 50 | # freetype-2.5 detection |
---|
| 51 | %patch4 -p1 |
---|
[821] | 52 | |
---|
[521] | 53 | |
---|
| 54 | %build |
---|
| 55 | find . -type f -exec %{__perl} -pi -e 's|^#!/.*bin/perl\S*|#!%{__perl}|i;' {} \; |
---|
| 56 | CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{_prefix} INSTALLDIRS=vendor |
---|
[3936] | 57 | #make %{?_smp_mflags} |
---|
| 58 | make |
---|
[521] | 59 | |
---|
[3934] | 60 | %if %{run_test} |
---|
| 61 | make test |
---|
| 62 | #-------------------------------# |
---|
| 63 | # Sun May 22 2011 ..last tested # |
---|
| 64 | # Result: PASS |
---|
| 65 | #-------------------------------# |
---|
| 66 | %endif |
---|
| 67 | |
---|
| 68 | |
---|
[521] | 69 | %install |
---|
| 70 | rm -rf $RPM_BUILD_ROOT |
---|
| 71 | make install |
---|
| 72 | |
---|
| 73 | [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress |
---|
| 74 | |
---|
| 75 | find $RPM_BUILD_ROOT%{_prefix} -type f -print | \ |
---|
| 76 | sed "s@^$RPM_BUILD_ROOT@@g" | \ |
---|
| 77 | grep -v perllocal.pod | \ |
---|
| 78 | grep -v "\.packlist" > %{pkgname}-%{version}-filelist |
---|
| 79 | if [ "$(cat %{pkgname}-%{version}-filelist)X" = "X" ] ; then |
---|
| 80 | echo "ERROR: EMPTY FILE LIST" |
---|
| 81 | exit -1 |
---|
| 82 | fi |
---|
| 83 | |
---|
| 84 | %clean |
---|
| 85 | rm -rf $RPM_BUILD_ROOT |
---|
| 86 | |
---|
| 87 | %files -f %{pkgname}-%{version}-filelist |
---|
| 88 | %defattr(-,root,root) |
---|
[821] | 89 | %doc README MANIFEST COPYING Change.log Changes README.linux pTk.docs |
---|
[3934] | 90 | %exclude %{perl_archlib}/perllocal.pod |
---|
| 91 | %exclude %{perl_vendorarch}/auto/Tk/.packlist |
---|
[521] | 92 | |
---|
[3934] | 93 | |
---|
[521] | 94 | %changelog |
---|
[8731] | 95 | * Thu Jul 3 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 804.032-1 |
---|
| 96 | - new upstream release. |
---|
| 97 | - replaced patches. |
---|
| 98 | |
---|
[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 | |
---|