]> git.pld-linux.org Git - packages/netpbm.git/blob - netpbm.spec
- updated to 9.12.
[packages/netpbm.git] / netpbm.spec
1 Summary:        A library for handling different graphics file formats
2 Name:           netpbm
3 Version:        9.12
4 Release:        1
5 License:        freeware
6 Group:          Libraries
7 Group(de):      Libraries
8 Group(es):      Bibliotecas
9 Group(fr):      Librairies
10 Group(pl):      Biblioteki
11 Source0:        ftp://download.sourceforge.net/pub/sourceforge/netpbm/%{name}-%{version}.tgz
12 Patch0:         %{name}-install.patch
13 Patch1:         %{name}-paths.patch
14 BuildRequires:  libjpeg-devel
15 BuildRequires:  libpng-devel
16 BuildRequires:  libtiff-devel
17 Buildroot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 Obsoletes:      libgr
19
20 %description
21 The netpbm package contains a library of functions which support
22 programs for handling various graphics file formats, including .pbm
23 (portable bitmaps), .pgm (portable graymaps), .pnm (portable anymaps),
24 .ppm (portable pixmaps) and others.
25
26 %package devel
27 Summary:        Development tools for programs which will use the netpbm libraries
28 Group:          Development/Libraries
29 Group(de):      Entwicklung/Libraries
30 Group(fr):      Development/Librairies
31 Group(pl):      Programowanie/Biblioteki
32 Requires:       %{name} = %{version}
33 Obsoletes:      libgr-devel
34
35 %package static
36 Summary:        Static netpbm libraries
37 Group:          Development/Libraries
38 Group(de):      Entwicklung/Libraries
39 Group(fr):      Development/Librairies
40 Group(pl):      Programowanie/Biblioteki
41 Requires:       %{name}-devel = %{version}
42 Obsoletes:      libgr-static
43
44 %description static
45 Static netpbm libraries.
46
47 %description devel
48 The netpbm-devel package contains the header files and static
49 libraries, etc., for developing programs which can handle the various
50 graphics file formats supported by the netpbm libraries.
51
52 Install netpbm-devel if you want to develop programs for handling the
53 graphics file formats supported by the netpbm libraries. You'll also
54 need to have the netpbm package installed.
55
56 %package progs
57 Summary:        Tools for manipulating graphics files in netpbm supported formats
58 Group:          Applications/Graphics
59 Group(de):      Applikationen/Grafik
60 Group(pl):      Aplikacje/Grafika
61 Requires:       %{name} = %{version}
62 Obsoletes:      libgr-progs
63
64 %description progs
65 The netpbm-progs package contains a group of scripts for manipulating
66 the graphics files in formats which are supported by the netpbm
67 libraries. For example, netpbm-progs includes the rasttopnm script,
68 which will convert a Sun rasterfile into a portable anymap.
69 Netpbm-progs contains many other scripts for converting from one
70 graphics file format to another.
71
72 If you need to use these conversion scripts, you should install
73 netpbm-progs. You'll also need to install the netpbm package.
74
75 %prep
76 %setup -q
77 %patch0 -p1
78 %patch1 -p1
79
80 %build
81 %{__make} \
82         CC=%{__cc} \
83         CFLAGS="%{!?debug:$RPM_OPT_FLAGS}%{?debug:-O0 -g} -fPIC" \
84         JPEGINC_DIR=%{_includedir} \
85         PNGINC_DIR=%{_includedir} \
86         TIFFINC_DIR=%{_includedir} \
87         JPEGLIB_DIR=%{_libdir} \
88         PNGLIB_DIR=%{_libdir} \
89         TIFFLIB_DIR=%{_libdir} << EOF
90 1
91 /usr
92 shared
93 EOF
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
98 PATH="`pwd`:${PATH}" make install \
99         JPEGINC_DIR=$RPM_BUILD_ROOT%{_includedir} \
100         PNGINC_DIR=$RPM_BUILD_ROOT%{_includedir} \
101         TIFFINC_DIR=$RPM_BUILD_ROOT%{_includedir} \
102         JPEGLIB_DIR=%{_libdir} \
103         PNGLIB_DIR=%{_libdir} \
104         TIFFLIB_DIR=%{_libdir} \
105         INSTALL_PREFIX=$RPM_BUILD_ROOT%{_prefix} \
106         INSTALLBINARIES=$RPM_BUILD_ROOT%{_bindir} \
107         INSTALLHDRS=$RPM_BUILD_ROOT%{_includedir} \
108         INSTALLLIBS=$RPM_BUILD_ROOT%{_libdir} \
109         INSTALLMANUALS1=$RPM_BUILD_ROOT%{_mandir}/man1 \
110         INSTALLMANUALS3=$RPM_BUILD_ROOT%{_mandir}/man3 \
111         INSTALLMANUALS5=$RPM_BUILD_ROOT%{_mandir}/man5
112
113 # Install header files.
114 install -d $RPM_BUILD_ROOT%{_includedir}
115 install pbm/pbm.h $RPM_BUILD_ROOT/%{_includedir}
116 install pbmplus.h $RPM_BUILD_ROOT/%{_includedir}
117 install pgm/pgm.h $RPM_BUILD_ROOT/%{_includedir}
118 install pnm/pnm.h $RPM_BUILD_ROOT/%{_includedir}
119 install ppm/ppm.h $RPM_BUILD_ROOT/%{_includedir}
120 install shhopt/shhopt.h $RPM_BUILD_ROOT/%{_includedir}
121
122 # Install the static-only librle.a
123 install urt/{rle,rle_config}.h $RPM_BUILD_ROOT/%{_includedir}/
124 install urt/librle.a $RPM_BUILD_ROOT%{_libdir}/
125
126 # Fixup symlinks.
127 ln -sf gemtopnm $RPM_BUILD_ROOT%{_bindir}/gemtopbm
128 ln -sf pnmtoplainpnm $RPM_BUILD_ROOT%{_bindir}/pnmnoraw
129
130 # Fixup perl paths in the two scripts that require it.
131 perl -pi -e 's^/bin/perl^%{__perl}^' \
132 $RPM_BUILD_ROOT%{_bindir}/{ppmfade,ppmshadow}
133
134 gzip -9nf COPYRIGHT.PATENT HISTORY README README.CONFOCAL
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %post   -p /sbin/ldconfig
140 %postun -p /sbin/ldconfig
141
142 %files
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_libdir}/lib*.so.*.*
145
146 %files devel
147 %defattr(644,root,root,755)
148 %doc *.gz
149 %{_includedir}/*.h
150 %attr(755,root,root) %{_libdir}/lib*.so
151 %{_mandir}/man3/*
152
153 %files static
154 %defattr(644,root,root,755)
155 %{_libdir}/lib*.a
156
157 %files progs
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_bindir}/*
160 %{_mandir}/man[15]/*
This page took 0.07946 seconds and 4 git commands to generate.