]> git.pld-linux.org Git - packages/crossmingw32-libpng.git/blob - crossmingw32-libpng.spec
- shared + static build
[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:          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-w32api
20 BuildRequires:  crossmingw32-zlib
21 Requires:       crossmingw32-zlib
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %define         no_install_post_strip   1
25
26 %define         target                  i386-mingw32
27 %define         target_platform         i386-pc-mingw32
28 %define         arch                    %{_prefix}/%{target}
29 %define         gccarch                 %{_prefix}/lib/gcc-lib/%{target}
30 %define         gcclib                  %{_prefix}/lib/gcc-lib/%{target}/%{version}
31
32 %define         _sysprefix              /usr
33 %define         _prefix                 %{_sysprefix}/%{target}
34 %define         _pkgconfigdir           %{_prefix}/lib/pkgconfig
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 %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 #%package dll
53 #Summary:       libpng - DLL library for Windows
54 #Summary(pl.UTF-8):     libpng - biblioteka DLL dla Windows
55 #Group:         Applications/Emulators
56 #
57 #%description dll
58 #libpng - DLL library for Windows.
59 #
60 #%description dll -l pl.UTF-8
61 #libpng - biblioteka DLL dla Windows.
62
63 %prep
64 %setup -q -n %{realname}-%{version}
65 %patch0 -p1
66 %patch1 -p1
67 %patch2 -p1
68 %patch3 -p1
69 %patch4 -p1
70
71 ln -sf scripts/makefile.gcmmx ./Makefile
72
73 %patch5 -p1
74
75 %build
76 #%{__make} \
77 #       prefix=%{_arch} \
78 #       LIBPATH=%{_arch}/lib \
79 #       CC="%{target}-gcc" \
80 #       RANLIB="%{target}-ranlib" \
81 #       OPT_FLAGS="%{rpmcflags}" \
82 #       LDFLAGS="-static %{rpmldflags}"
83 %configure \
84         --target=%{target} \
85         --host=%{target} \
86         --with-pkgconfigdir=%{_pkgconfigdir}
87
88 %{__make}
89
90 %if 0%{!?debug:1}
91 %{target}-strip -R.comment -R.note .libs/*.dll
92 %{target}-strip -g -R.comment -R.note .libs/*.a
93 %endif
94
95 %install
96 #rm -rf $RPM_BUILD_ROOT
97 #install -d $RPM_BUILD_ROOT%{arch}/{include,lib}
98 # install -d $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
99 #
100 #install *.a $RPM_BUILD_ROOT%{arch}/lib
101 #install png.h pngconf.h $RPM_BUILD_ROOT%{arch}/include
102 #install *.dll $RPM_BUILD_ROOT%{_datadir}/wine/windows/system
103 %{__make} install \
104         DESTDIR=$RPM_BUILD_ROOT
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %files
110 %defattr(644,root,root,755)
111 %dir %{_includedir}/libpng12
112 %{_includedir}/libpng12/*
113 %{_libdir}/*.la
114 %{_libdir}/*.a
115 %{_bindir}/*.dll
116 %{_pkgconfigdir}/*.pc
117
118 #%files dll
119 #%defattr(644,root,root,755)
120 #%{_datadir}/wine/windows/system/*.dll
This page took 0.071988 seconds and 3 git commands to generate.