]> git.pld-linux.org Git - packages/crossmingw32-libpng.git/blame - crossmingw32-libpng.spec
- updated to 1.5.10 (fixes CVE-2011-3048)
[packages/crossmingw32-libpng.git] / crossmingw32-libpng.spec
CommitLineData
9f7aa829 1%define realname libpng
b15bad05
JB
2Summary: PNG library - MinGW32 cross version
3Summary(pl.UTF-8): Biblioteka PNG - wersja skrośna dla MinGW32
9f7aa829 4Name: crossmingw32-%{realname}
8475a47f 5Version: 1.5.10
d71feee6 6Release: 1
9f7aa829 7License: distributable
8388a19b 8Group: Development/Libraries
fe64cb93 9Source0: http://downloads.sourceforge.net/libpng/%{realname}-%{version}.tar.xz
8475a47f 10# Source0-md5: 9c2ac3c3a31de2ab867875718f8de18e
9f7aa829 11Patch0: %{realname}-pngminus.patch
91788afb 12Patch1: http://downloads.sourceforge.net/libpng-apng/%{realname}-%{version}-apng.patch.gz
8475a47f 13# Patch1-md5: 88517ab0e9c0be2590800116e2b50c8d
91788afb 14Patch2: %{realname}-apng-fix.patch
9f7aa829 15URL: http://www.libpng.org/pub/png/libpng.html
16BuildRequires: crossmingw32-gcc
9f7aa829 17BuildRequires: crossmingw32-zlib
81c0d773 18BuildRequires: sed >= 4.0
70f4a7a9 19BuildRequires: tar >= 1:1.22
fe64cb93 20BuildRequires: xz >= 1:4.999.7
2f40b942 21Requires: crossmingw32-zlib
a73e6b35 22Provides: crossmingw32-libpng(APNG) = 0.10
9f7aa829 23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%define no_install_post_strip 1
26
1cc5645e 27%define target i386-mingw32
bec58d81 28%define target_platform i386-pc-mingw32
1cc5645e 29
30%define _sysprefix /usr
31%define _prefix %{_sysprefix}/%{target}
b6948a14 32%define _libdir %{_prefix}/lib
1cc5645e 33%define _pkgconfigdir %{_prefix}/lib/pkgconfig
8388a19b 34%define _dlldir /usr/share/wine/windows/system
1cc5645e 35%define __cc %{target}-gcc
36%define __cxx %{target}-g++
9f7aa829 37
66bd41c2
JB
38%ifnarch %{ix86}
39# arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
2b67cc26 40%define optflags -O2
41%endif
66bd41c2 42# -z options are invalid for mingw linker
e20c2eed 43%define filterout_ld -Wl,-z,.*
2b67cc26 44
9f7aa829 45%description
46The PNG library is a collection of routines used to create and
47manipulate PNG format graphics files. The PNG format was designed as a
48replacement for GIF, with many improvements and extensions.
49
8388a19b
JB
50This package contains the cross version for Win32.
51
cb750922
JR
52%description -l pl.UTF-8
53Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
54plikami w formacie graficznym PNG. Format ten został stworzony jako
55zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
9f7aa829 56
8388a19b
JB
57Ten pakiet zawiera wersję skrośną dla Win32.
58
59%package static
b15bad05
JB
60Summary: Static libpng library (cross MinGW32 version)
61Summary(pl.UTF-8): Statyczna biblioteka libpng (wersja skrośna MinGW32)
8388a19b
JB
62Group: Development/Libraries
63Requires: %{name} = %{version}-%{release}
a73e6b35 64Provides: crossmingw32-libpng-static(APNG) = 0.10
8388a19b
JB
65
66%description static
b15bad05 67Static libpng library (cross MinGW32 version).
8388a19b
JB
68
69%description static -l pl.UTF-8
b15bad05 70Statyczna biblioteka libpng (wersja skrośna MinGW32).
8388a19b
JB
71
72%package dll
73Summary: libpng - DLL library for Windows
74Summary(pl.UTF-8): libpng - biblioteka DLL dla Windows
75Group: Applications/Emulators
76Requires: crossmingw32-zlib-dll
77Requires: wine
a73e6b35 78Provides: crossmingw32-libpng-dll(APNG) = 0.10
8388a19b
JB
79
80%description dll
81libpng - DLL library for Windows.
82
83%description dll -l pl.UTF-8
84libpng - biblioteka DLL dla Windows.
9f7aa829 85
86%prep
eb49f919 87%setup -q -n %{realname}-%{version}
9f7aa829 88%patch0 -p1
91788afb
JB
89%patch1 -p1
90%patch2 -p1
9f7aa829 91
81c0d773
JB
92# avoid version script
93sed -i -e 's/^GLD=.*/GLD=/' configure
94
9f7aa829 95%build
1cc5645e 96%configure \
97 --target=%{target} \
98 --host=%{target} \
99 --with-pkgconfigdir=%{_pkgconfigdir}
100
0e98fafe 101%{__make}
9f7aa829 102
9f7aa829 103%install
8388a19b
JB
104rm -rf $RPM_BUILD_ROOT
105
1cc5645e 106%{__make} install \
107 DESTDIR=$RPM_BUILD_ROOT
9f7aa829 108
8388a19b
JB
109install -d $RPM_BUILD_ROOT%{_dlldir}
110mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
111
91788afb 112ln -sf libpng15.dll.a $RPM_BUILD_ROOT%{_libdir}/libpng.dll.a
fe64cb93 113
8388a19b
JB
114%if 0%{!?debug:1}
115%{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
116%{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
117%endif
118
91788afb 119%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/man
8388a19b 120
9f7aa829 121%clean
122rm -rf $RPM_BUILD_ROOT
123
124%files
125%defattr(644,root,root,755)
91788afb 126%{_libdir}/libpng15.dll.a
8388a19b 127%{_libdir}/libpng.dll.a
91788afb 128%{_libdir}/libpng15.la
8388a19b 129%{_libdir}/libpng.la
91788afb 130%{_includedir}/libpng15
fe64cb93 131%{_includedir}/png*.h
91788afb 132%{_pkgconfigdir}/libpng15.pc
fe64cb93 133%{_pkgconfigdir}/libpng.pc
1cc5645e 134
8388a19b
JB
135%files static
136%defattr(644,root,root,755)
91788afb 137%{_libdir}/libpng15.a
8388a19b 138%{_libdir}/libpng.a
8388a19b
JB
139
140%files dll
141%defattr(644,root,root,755)
91788afb 142%{_dlldir}/libpng15-*.dll
This page took 0.63625 seconds and 4 git commands to generate.