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