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