forked from freddix/libpng12
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibpng12.spec
112 lines (94 loc) · 2.76 KB
/
libpng12.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
Summary: PNG library
Name: libpng12
Version: 1.2.50
Release: 1
Epoch: 2
License: distributable
Group: Libraries
Source0: http://download.sourceforge.net/libpng/libpng-%{version}.tar.xz
# Source0-md5: a3e00fccbfe356174ab515b5c00641c7
Patch0: %{name}-pngminus.patch
Patch1: %{name}-opt.patch
Patch2: %{name}-norpath.patch
Patch3: %{name}-export_old.patch
Patch4: %{name}-revert.patch
Patch5: %{name}-apng.patch
URL: http://www.libpng.org/pub/png/libpng.html
BuildRequires: zlib-devel
Provides: libpng = %{epoch}:%{version}-%{release}
Provides: libpng.so.3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
The PNG library is a collection of routines used to create and
manipulate PNG format graphics files. The PNG format was designed as a
replacement for GIF, with many improvements and extensions.
%package devel
Summary: Header files for libpng
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
Provides: libpng-devel = %{epoch}:%{version}-%{release}
%description devel
The header files are only needed for development of programs using the
PNG library.
%package static
Summary: Static png library
Group: Development/Libraries
Requires: %{name}-devel = %{epoch}:%{version}-%{release}
Provides: libpng-devel = %{epoch}:%{version}-%{release}
%description static
Static ppng library.
%package progs
Summary: libpng utility programs
Group: Applications/Graphics
%description progs
This package contains utility programs to convert PNG files to and
from PNM files.
%prep
%setup -qn libpng-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p0
%build
%{__libtoolize}
%{__aclocal}
%{__autoheader}
%{__automake}
%{__autoconf}
%configure
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir},%{_mandir}/man{3,5}} \
$RPM_BUILD_ROOT%{_pkgconfigdir}
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
# parts provided by libpng >= 1.4.x
%{__rm} $RPM_BUILD_ROOT%{_bindir}/libpng-config \
$RPM_BUILD_ROOT%{_includedir}/png*.h \
$RPM_BUILD_ROOT%{_libdir}/libpng.{la,so,a} \
$RPM_BUILD_ROOT%{_pkgconfigdir}/libpng.pc
%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/man[35]
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc ANNOUNCE CHANGES KNOWNBUG README LICENSE
%attr(755,root,root) %ghost %{_libdir}/libpng12.so.0
%attr(755,root,root) %{_libdir}/libpng*.so.*.*.*
%attr(755,root,root) %{_libdir}/libpng.so.3
%files devel
%defattr(644,root,root,755)
%doc *.txt
%attr(755,root,root) %{_bindir}/libpng12-config
%attr(755,root,root) %{_libdir}/libpng12.so
%{_includedir}/libpng12
%{_libdir}/libpng12.la
%{_pkgconfigdir}/libpng12.pc
%files static
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libpng*.a