]> git.pld-linux.org Git - packages/crossmingw32-libpng.git/blob - crossmingw32-libpng.spec
65e92b9c3ec15563367850d140dd5d524fc23deb
[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.25
6 Release:        1
7 License:        distributable
8 Group:          Development/Libraries
9 Source0:        http://dl.sourceforge.net/libpng/%{realname}-%{version}.tar.lzma
10 # Source0-md5:  f340daef5a039ec6d25bddc9b3b91a52
11 Patch0:         %{realname}-pngminus.patch
12 Patch1:         %{realname}-opt.patch
13 Patch2:         %{realname}-revert.patch
14 Patch3:         %{realname}-norpath.patch
15 Patch4:         %{realname}-apng.patch
16 Patch5:         %{name}-shared.patch
17 URL:            http://www.libpng.org/pub/png/libpng.html
18 BuildRequires:  crossmingw32-gcc
19 BuildRequires:  crossmingw32-zlib
20 BuildRequires:  lzma >= 1:4.42
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 %ifarch alpha sparc sparc64 sparcv9
39 %define         optflags        -O2
40 %endif
41
42 %description
43 The PNG library is a collection of routines used to create and
44 manipulate PNG format graphics files. The PNG format was designed as a
45 replacement for GIF, with many improvements and extensions.
46
47 This package contains the cross version for Win32.
48
49 %description -l pl.UTF-8
50 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
51 plikami w formacie graficznym PNG. Format ten został stworzony jako
52 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
53
54 Ten pakiet zawiera wersję skrośną dla Win32.
55
56 %package static
57 Summary:        Static libpng library (cross mingw32 version)
58 Summary(pl.UTF-8):      Statyczna biblioteka libpng (wersja skrośna mingw32)
59 Group:          Development/Libraries
60 Requires:       %{name} = %{version}-%{release}
61 Provides:       crossmingw32-libpng-static(APNG) = 0.10
62
63 %description static
64 Static libpng library (cross mingw32 version).
65
66 %description static -l pl.UTF-8
67 Statyczna biblioteka libpng (wersja skrośna mingw32).
68
69 %package dll
70 Summary:        libpng - DLL library for Windows
71 Summary(pl.UTF-8):      libpng - biblioteka DLL dla Windows
72 Group:          Applications/Emulators
73 Requires:       crossmingw32-zlib-dll
74 Requires:       wine
75 Provides:       crossmingw32-libpng-dll(APNG) = 0.10
76
77 %description dll
78 libpng - DLL library for Windows.
79
80 %description dll -l pl.UTF-8
81 libpng - biblioteka DLL dla Windows.
82
83 %prep
84 %setup -q -n %{realname}-%{version} -c -T
85 lzma -dc %{SOURCE0} | tar xf - -C ..
86 %patch0 -p1
87 %patch1 -p1
88 %patch2 -p1
89 %patch3 -p1
90 %patch4 -p0
91 %patch5 -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 %if 0%{!?debug:1}
111 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
112 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
113 %endif
114
115 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %files
121 %defattr(644,root,root,755)
122 %{_libdir}/libpng.dll.a
123 %{_libdir}/libpng12.dll.a
124 %{_libdir}/libpng.la
125 %{_libdir}/libpng12.la
126 %dir %{_includedir}/libpng12
127 %{_includedir}/libpng12/*
128 %{_pkgconfigdir}/*.pc
129
130 %files static
131 %defattr(644,root,root,755)
132 %{_libdir}/libpng.a
133 %{_libdir}/libpng12.a
134
135 %files dll
136 %defattr(644,root,root,755)
137 %{_dlldir}/libpng-*.dll
138 %{_dlldir}/libpng12-*.dll
This page took 0.030758 seconds and 2 git commands to generate.