]> git.pld-linux.org Git - packages/crossmingw32-libpng.git/blob - crossmingw32-libpng.spec
- updated to 1.2.28
[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.28
6 Release:        1
7 License:        distributable
8 Group:          Development/Libraries
9 Source0:        http://dl.sourceforge.net/libpng/%{realname}-%{version}.tar.lzma
10 # Source0-md5:  8c57a49f822b12374af7668633c11e45
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 %ifarch alpha sparc sparc64 sparcv9
43 %define         optflags        -O2
44 %endif
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} -c -T
89 lzma -dc %{SOURCE0} | tar xf - -C ..
90 %patch0 -p1
91 %patch1 -p1
92 %patch2 -p1
93 %patch3 -p1
94 %patch4 -p0
95 %patch5 -p1
96
97 %build
98 %{__libtoolize}
99 %{__aclocal}
100 %{__autoconf}
101 %{__autoheader}
102 %{__automake}
103 %configure \
104         --target=%{target} \
105         --host=%{target} \
106         --with-pkgconfigdir=%{_pkgconfigdir}
107
108 %{__make} \
109         ECHO=echo
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113
114 %{__make} install \
115         DESTDIR=$RPM_BUILD_ROOT
116
117 install -d $RPM_BUILD_ROOT%{_dlldir}
118 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
119
120 %if 0%{!?debug:1}
121 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
122 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
123 %endif
124
125 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
126
127 %clean
128 rm -rf $RPM_BUILD_ROOT
129
130 %files
131 %defattr(644,root,root,755)
132 %{_libdir}/libpng.dll.a
133 %{_libdir}/libpng12.dll.a
134 %{_libdir}/libpng.la
135 %{_libdir}/libpng12.la
136 %dir %{_includedir}/libpng12
137 %{_includedir}/libpng12/*
138 %{_pkgconfigdir}/*.pc
139
140 %files static
141 %defattr(644,root,root,755)
142 %{_libdir}/libpng.a
143 %{_libdir}/libpng12.a
144
145 %files dll
146 %defattr(644,root,root,755)
147 %{_dlldir}/libpng-*.dll
148 %{_dlldir}/libpng12-*.dll
This page took 0.059347 seconds and 4 git commands to generate.