]> git.pld-linux.org Git - packages/gd.git/blob - gd.spec
- release 3, built against libpng >= 1.0.8
[packages/gd.git] / gd.spec
1 Summary:        Library for PNG, JPEG creation
2 Summary(pl):    Biblioteka do tworzenia grafiki w formacie PNG, JPEG
3 Name:           gd
4 Version:        1.8.3
5 Release: 3
6 License:        BSD-style
7 Group:          Libraries
8 Group(fr):      Librairies
9 Group(pl):      Biblioteki
10 Source0:        ftp://ftp.boutell.com/pub/boutell/gd/%{name}-%{version}.tar.gz
11 Patch0:         gd-pld-patch
12 URL:            http://www.boutell.com/gd/
13 BuildRequires:  zlib-devel
14 BuildRequires:  libpng >= 1.0.8
15 BuildRequires:  freetype-devel
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define shlibver %(echo %{version} | cut -f-2 -d.)
19
20 %description
21 gd library creates PNG, JPEG and WBMP images, not GIF images. This is a
22 good thing. PNG is a more compact format, and full compression is available.
23 JPEG works well with photographic images, and is still more compatible with
24 the major Web browsers than even PNG is. WBMP is intended for wireless
25 devices (not regular web browsers). Existing code will need modification to
26 call or gdImageJpeg instead of gdImageGif.
27
28 This library allows you to easily create and manipulate PNG, JPEG image
29 files from your C programs.
30
31 %description -l pl
32 Biblioteka pozwalaj±ca na proste tworzenie i manipulowanie plikami
33 graficznymi w formacie PNG.
34
35 %package devel
36 Summary:        Development part of the GD library
37 Summary(pl):    Czê¶æ biblioteki GD przeznaczona dla developerów
38 Group:          Development/Libraries
39 Group(fr):      Development/Librairies
40 Group(pl):      Programowanie/Biblioteki
41 Requires:       %{name} = %{version}
42
43 %description devel
44 This package contains the files needed for development of programs
45 linked against GD.
46
47 %description -l pl devel
48 Pakiet ten zawiera pliki potrzebne do rozwoju programów korzystaj±cych
49 z biblioteki GD.
50
51 %package static
52 Summary:        Static GD library
53 Summary(pl):    Statyczna biblioteka GD
54 Group:          Development/Libraries
55 Group(fr):      Development/Librairies
56 Group(pl):      Programowanie/Biblioteki
57 Requires:       %{name} = %{version}
58
59 %description devel
60 This package contains static GD library.
61
62 %description -l pl static
63 Pakiet ten zawiera statyczn± bibliotekê GD.
64
65 %prep
66 %setup -q 
67 %patch0 -p1 
68
69 %build
70 CFLAGS="$RPM_OPT_FLAGS -I/usr/include/freetype"
71 LDFLAGS="-s"
72 export CFLAGS LDFLAGS
73 %{__make} libgd.a
74 gcc -shared -o libgd.so.%{version} -Wl,-soname=libgd.so.%{shlibver} \
75         `ar t libgd.a` -L/usr/X11R6/lib -lttf -ljpeg -lpng -lz -lm
76
77 %install
78
79
80 [ "$RPM_BUILD_ROOT" != "/" ] && rm -fr $RPM_BUILD_ROOT
81 mkdir -p $RPM_BUILD_ROOT{%{_bindir},%{_includedir},%{_libdir}}
82 %{__make} install \
83         INSTALL_BIN=$RPM_BUILD_ROOT%{_bindir} \
84         INSTALL_INCLUDE=$RPM_BUILD_ROOT%{_includedir} \
85         INSTALL_LIB=$RPM_BUILD_ROOT%{_libdir}
86
87 install libgd.so.%{version} $RPM_BUILD_ROOT%{_libdir}/
88 ln -s libgd.so.%{version} $RPM_BUILD_ROOT%{_libdir}/libgd.so
89
90 #make DESTDIR="$RPM_BUILD_ROOT" install
91
92 strip --strip-unneeded $RPM_BUILD_ROOT%{_libdir}/lib*.so.*.*
93
94 gzip -9nf readme.txt index.html 
95
96 %clean
97 rm -fr $RPM_BUILD_ROOT
98
99 %post   -p /sbin/ldconfig
100 %postun -p /sbin/ldconfig
101
102 %files
103 %defattr(644,root,root,755)
104 %doc readme.txt.gz
105 %attr(755,root,root) %{_bindir}/*
106 %attr(755,root,root) %{_libdir}/*.so.*.*
107
108 %files devel
109 %defattr(644,root,root,755)
110 %doc index.html.gz 
111 %attr(755,root,root) %{_libdir}/*.so
112 %{_includedir}/*
113
114 %files static
115 %defattr(644,root,root,755)
116 %{_libdir}/lib*.a
This page took 0.103727 seconds and 4 git commands to generate.