]> git.pld-linux.org Git - packages/crossmingw32-libpng.git/blob - crossmingw32-libpng.spec
- cleanup, separated -static, restored -dll
[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.16
6 Release:        1
7 License:        distributable
8 Group:          Development/Libraries
9 Source0:        http://dl.sourceforge.net/libpng/%{realname}-%{version}.tar.bz2
10 # Source0-md5:  7a1ca4f49bcffdec60d50f48460642bd
11 Patch0:         %{realname}-pngminus.patch
12 Patch1:         %{realname}-opt.patch
13 Patch2:         %{realname}-revert.patch
14 Patch3:         %{realname}-norpath.patch
15 Patch4:         %{realname}-libdirfix.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 Requires:       crossmingw32-zlib
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 %define         arch                    %{_prefix}/%{target}
28
29 %define         _sysprefix              /usr
30 %define         _prefix                 %{_sysprefix}/%{target}
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 %ifarch alpha sparc sparc64 sparcv9
37 %define         optflags        -O2
38 %endif
39
40 %description
41 The PNG library is a collection of routines used to create and
42 manipulate PNG format graphics files. The PNG format was designed as a
43 replacement for GIF, with many improvements and extensions.
44
45 This package contains the cross version for Win32.
46
47 %description -l pl.UTF-8
48 Biblioteki PNG są kolekcją form używanych do tworzenia i manipulowania
49 plikami w formacie graficznym PNG. Format ten został stworzony jako
50 zamiennik dla formatu GIF, z wieloma rozszerzeniami i nowościami.
51
52 Ten pakiet zawiera wersję skrośną dla Win32.
53
54 %package static
55 Summary:        Static libpng library (cross mingw32 version)
56 Summary(pl.UTF-8):      Statyczna biblioteka libpng (wersja skrośna mingw32)
57 Group:          Development/Libraries
58 Requires:       %{name} = %{version}-%{release}
59
60 %description static
61 Static libpng library (cross mingw32 version).
62
63 %description static -l pl.UTF-8
64 Statyczna biblioteka libpng (wersja skrośna mingw32).
65
66 %package dll
67 Summary:        libpng - DLL library for Windows
68 Summary(pl.UTF-8):      libpng - biblioteka DLL dla Windows
69 Group:          Applications/Emulators
70 Requires:       crossmingw32-zlib-dll
71 Requires:       wine
72
73 %description dll
74 libpng - DLL library for Windows.
75
76 %description dll -l pl.UTF-8
77 libpng - biblioteka DLL dla Windows.
78
79 %prep
80 %setup -q -n %{realname}-%{version}
81 %patch0 -p1
82 %patch1 -p1
83 %patch2 -p1
84 %patch3 -p1
85 %patch4 -p1
86 %patch5 -p1
87
88 %build
89 %configure \
90         --target=%{target} \
91         --host=%{target} \
92         --with-pkgconfigdir=%{_pkgconfigdir}
93
94 %{__make}
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98
99 %{__make} install \
100         DESTDIR=$RPM_BUILD_ROOT
101
102 install -d $RPM_BUILD_ROOT%{_dlldir}
103 mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
104
105 %if 0%{!?debug:1}
106 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
107 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a
108 %endif
109
110 rm -rf $RPM_BUILD_ROOT%{_datadir}/man
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %files
116 %defattr(644,root,root,755)
117 %{_libdir}/libpng.dll.a
118 %{_libdir}/libpng12.dll.a
119 %{_libdir}/libpng.la
120 %{_libdir}/libpng12.la
121 %dir %{_includedir}/libpng12
122 %{_includedir}/libpng12/*
123 %{_pkgconfigdir}/*.pc
124
125 %files static
126 %defattr(644,root,root,755)
127 %{_libdir}/libpng.a
128 %{_libdir}/libpng12.a
129
130 %files dll
131 %defattr(644,root,root,755)
132 %{_dlldir}/libpng-*.dll
133 %{_dlldir}/libpng12-*.dll
This page took 0.072043 seconds and 4 git commands to generate.