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