]> git.pld-linux.org Git - packages/crossmingw32-libpng.git/blob - crossmingw32-libpng.spec
- updated to 1.5.12
[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.12
6 Release:        1
7 License:        distributable
8 Group:          Development/Libraries
9 Source0:        http://downloads.sourceforge.net/libpng/%{realname}-%{version}.tar.xz
10 # Source0-md5:  0fd51add1da6a0e470e0c726c59171b9
11 Patch0:         %{realname}-pngminus.patch
12 Patch1:         http://downloads.sourceforge.net/libpng-apng/%{realname}-%{version}-apng.patch.gz
13 # Patch1-md5:   7f2924b1fe0cca9080e18b8720443716
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, most of -f options are Linux-specific
43 %define         filterout_ld    -Wl,-z,.*
44 %define         filterout_c     -f[-a-z0-9=]*
45
46 %description
47 The PNG library is a collection of routines used to create and
48 manipulate PNG format graphics files. The PNG format was designed as a
49 replacement for GIF, with many improvements and extensions.
50
51 This package contains the cross version for Win32.
52
53 %description -l pl.UTF-8
54 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
55 plikami w formacie graficznym PNG. Format ten został stworzony jako
56 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
57
58 Ten pakiet zawiera wersję skrośną dla Win32.
59
60 %package static
61 Summary:        Static libpng library (cross MinGW32 version)
62 Summary(pl.UTF-8):      Statyczna biblioteka libpng (wersja skrośna MinGW32)
63 Group:          Development/Libraries
64 Requires:       %{name} = %{version}-%{release}
65 Provides:       crossmingw32-libpng-static(APNG) = 0.10
66
67 %description static
68 Static libpng library (cross MinGW32 version).
69
70 %description static -l pl.UTF-8
71 Statyczna biblioteka libpng (wersja skrośna MinGW32).
72
73 %package dll
74 Summary:        libpng - DLL library for Windows
75 Summary(pl.UTF-8):      libpng - biblioteka DLL dla Windows
76 Group:          Applications/Emulators
77 Requires:       crossmingw32-zlib-dll
78 Requires:       wine
79 Provides:       crossmingw32-libpng-dll(APNG) = 0.10
80
81 %description dll
82 libpng - DLL library for Windows.
83
84 %description dll -l pl.UTF-8
85 libpng - biblioteka DLL dla Windows.
86
87 %prep
88 %setup -q -n %{realname}-%{version}
89 %patch0 -p1
90 %patch1 -p1
91 %patch2 -p1
92
93 # avoid version script
94 sed -i -e 's/^GLD=.*/GLD=/' configure
95
96 %build
97 %configure \
98         --target=%{target} \
99         --host=%{target} \
100         --with-pkgconfigdir=%{_pkgconfigdir}
101
102 %{__make}
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106
107 %{__make} install \
108         DESTDIR=$RPM_BUILD_ROOT
109
110 install -d $RPM_BUILD_ROOT%{_dlldir}
111 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
112
113 ln -sf libpng15.dll.a $RPM_BUILD_ROOT%{_libdir}/libpng.dll.a
114
115 %if 0%{!?debug:1}
116 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
117 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
118 %endif
119
120 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/man
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %files
126 %defattr(644,root,root,755)
127 %{_libdir}/libpng15.dll.a
128 %{_libdir}/libpng.dll.a
129 %{_libdir}/libpng15.la
130 %{_libdir}/libpng.la
131 %{_includedir}/libpng15
132 %{_includedir}/png*.h
133 %{_pkgconfigdir}/libpng15.pc
134 %{_pkgconfigdir}/libpng.pc
135
136 %files static
137 %defattr(644,root,root,755)
138 %{_libdir}/libpng15.a
139 %{_libdir}/libpng.a
140
141 %files dll
142 %defattr(644,root,root,755)
143 %{_dlldir}/libpng15-*.dll
This page took 0.06768 seconds and 4 git commands to generate.