]> git.pld-linux.org Git - packages/crossmingw32-libpng.git/blob - crossmingw32-libpng.spec
- updated to 1.4.2
[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.4.2
6 Release:        1
7 License:        distributable
8 Group:          Development/Libraries
9 Source0:        http://downloads.sourceforge.net/libpng/%{realname}-%{version}.tar.xz
10 # Source0-md5:  d22ef5878842d918d6d110c0e7cc3afc
11 Patch0:         %{realname}-pngminus.patch
12 # http://littlesvr.ca/apng/diff/%{name}-%{version}-apng.patch | dos2unix
13 Patch1:         %{realname}-apng.patch
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:  xz >= 1:4.999.7
19 Requires:       crossmingw32-zlib
20 Provides:       crossmingw32-libpng(APNG) = 0.10
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         no_install_post_strip   1
24
25 %define         target                  i386-mingw32
26 %define         target_platform         i386-pc-mingw32
27
28 %define         _sysprefix              /usr
29 %define         _prefix                 %{_sysprefix}/%{target}
30 %define         _libdir                 %{_prefix}/lib
31 %define         _pkgconfigdir           %{_prefix}/lib/pkgconfig
32 %define         _dlldir                 /usr/share/wine/windows/system
33 %define         __cc                    %{target}-gcc
34 %define         __cxx                   %{target}-g++
35
36 %ifnarch %{ix86}
37 # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc
38 %define         optflags        -O2
39 %endif
40 # -z options are invalid for mingw linker
41 %define         filterout_ld    -Wl,-z,.*
42
43 %description
44 The PNG library is a collection of routines used to create and
45 manipulate PNG format graphics files. The PNG format was designed as a
46 replacement for GIF, with many improvements and extensions.
47
48 This package contains the cross version for Win32.
49
50 %description -l pl.UTF-8
51 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
52 plikami w formacie graficznym PNG. Format ten został stworzony jako
53 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
54
55 Ten pakiet zawiera wersję skrośną dla Win32.
56
57 %package static
58 Summary:        Static libpng library (cross mingw32 version)
59 Summary(pl.UTF-8):      Statyczna biblioteka libpng (wersja skrośna mingw32)
60 Group:          Development/Libraries
61 Requires:       %{name} = %{version}-%{release}
62 Provides:       crossmingw32-libpng-static(APNG) = 0.10
63
64 %description static
65 Static libpng library (cross mingw32 version).
66
67 %description static -l pl.UTF-8
68 Statyczna biblioteka libpng (wersja skrośna mingw32).
69
70 %package dll
71 Summary:        libpng - DLL library for Windows
72 Summary(pl.UTF-8):      libpng - biblioteka DLL dla Windows
73 Group:          Applications/Emulators
74 Requires:       crossmingw32-zlib-dll
75 Requires:       wine
76 Provides:       crossmingw32-libpng-dll(APNG) = 0.10
77
78 %description dll
79 libpng - DLL library for Windows.
80
81 %description dll -l pl.UTF-8
82 libpng - biblioteka DLL dla Windows.
83
84 %prep
85 %setup -q -n %{realname}-%{version} -c -T
86 xz -dc %{SOURCE0} | tar xf - -C ..
87 %patch0 -p1
88 %patch1 -p0
89
90 # avoid version script
91 sed -i -e 's/^GLD=.*/GLD=/' configure
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 libpng14.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 -rf $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}/libpng14.dll.a
125 %{_libdir}/libpng.dll.a
126 %{_libdir}/libpng14.la
127 %{_libdir}/libpng.la
128 %{_includedir}/libpng14
129 %{_includedir}/png*.h
130 %{_pkgconfigdir}/libpng14.pc
131 %{_pkgconfigdir}/libpng.pc
132
133 %files static
134 %defattr(644,root,root,755)
135 %{_libdir}/libpng14.a
136 %{_libdir}/libpng.a
137
138 %files dll
139 %defattr(644,root,root,755)
140 %{_dlldir}/libpng14-*.dll
This page took 0.083474 seconds and 4 git commands to generate.