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