]> granicus.if.org Git - zziplib/blob - zziplib.spec
add [--with-defines],[easy,harden,allow_modulo_entries]
[zziplib] / zziplib.spec
1 # norootforbuild
2 %define lib   lib010
3 Summary:      ZZipLib - libZ-based ZIP-access Library
4 Name:         zziplib
5 Version:      0.13.58
6 Release:      1
7 License:      LGPL
8 Group:        Development/Libraries
9 URL:          http://zziplib.sf.net
10 Vendor:       Guido Draheim <guidod@gmx.de>
11 Source0:      http://prdownloads.sf.net/%{name}/%{name}-%{version}.tar.bz2
12 BuildRoot:    /var/tmp/%{name}-%{version}-%{release}
13
14 Distribution: Original
15 Packager:     Guido Draheim <guidod@gmx.de>
16 Requires:      zlib
17 BuildRequires: zlib-devel
18 BuildRequires: SDL-devel
19 BuildRequires: zip
20
21 #Begin3
22 # Author1:        too@iki.fi (Tomi Ollila)
23 # Author2:        guidod@gmx.de (Guido Draheim)
24 # Maintained-by:  guidod@gmx.de (Guido Draheim)
25 # Primary-Site:   zziplib.sf.net
26 # Keywords:       zip zlib inflate archive gamedata
27 # Platforms:      zlib posix
28 # Copying-Policy: Lesser GPL Version 2
29 #End
30
31 %package %lib
32 Summary:      ZZipLib - Documentation Files
33 Group:        Development/Libraries
34 Provides:     zziplib = %version
35 Provides:     libzzip0 = %version
36 Provides:     libzzip-0.so.10
37
38 %package doc
39 Summary:      ZZipLib - Documentation Files
40 Group:        Development/Libraries
41 BuildRequires: python
42 BuildRequires: xmlto
43 PreReq: scrollkeeper
44
45 %package devel
46 Summary:      ZZipLib - Development Files
47 Group:        Development/Libraries
48 Requires:     zziplib-%lib = %version
49 Requires:     pkgconfig
50
51 %package SDL_rwops-devel
52 Summary:      ZZipLib - Development Files for SDL_rwops
53 Group:        Development/Libraries
54 Requires:     zziplib-%lib = %version
55 Requires:     pkgconfig
56 BuildRequires: SDL-devel
57
58 %description
59  : zziplib provides read access to zipped files in a zip-archive,
60  : using compression based solely on free algorithms provided by zlib.
61
62 %description %lib
63  : zziplib provides read access to zipped files in a zip-archive,
64  : using compression based solely on free algorithms provided by zlib.
65  zziplib provides an additional API to transparently access files
66  being either real files or zipped files with the same filepath argument.
67  This is handy to package many files being shared data into a single
68  zip file - as it is sometimes used with gamedata or script repositories.
69  The library itself is fully multithreaded, and it is namespace clean
70  using the zzip_ prefix for its exports and declarations.
71
72 %description doc
73  : zziplib provides read access to zipped files in a zip-archive,
74  : using compression based solely on free algorithms provided by zlib.
75  these are the (html) docs, mostly generated actually.
76
77 %description devel
78  : zziplib provides read access to zipped files in a zip-archive,
79  : using compression based solely on free algorithms provided by zlib.
80  these are the header files needed to develop programs using zziplib.
81  there are test binaries to hint usage of the library in user programs.
82
83 %description SDL_rwops-devel
84  : zziplib provides read access to zipped files in a zip-archive,
85  : using compression based solely on free algorithms provided by zlib.
86  these are example headers and implementation along with a pkgconfig
87  script that allows to easily use zziplib through SDL_rwops calls.
88
89 %prep
90 #'
91 %setup
92
93
94 CFLAGS="$RPM_OPT_FLAGS" \
95 sh configure --prefix=%{_prefix} \
96              --with-docdir=%{_docdir} \
97              --mandir=%{_mandir} \
98              --bindir=%{_bindir} \
99              --libdir=%{_libdir} \
100              --enable-sdl  TIMEOUT=9
101 %__make zzip64-setup
102
103 %build
104 %__make %{?jobs:-j%jobs}
105 %__make check
106 %__make test-sdl
107 %__make %{?jobs:-j%jobs} zzip64-build
108 %__make %{?jobs:-j%jobs} doc
109
110 %install
111 %__rm -rf %{buildroot}
112 %__make zzip64-install DESTDIR=%{buildroot}
113 %__make install DESTDIR=%{buildroot}
114 %__make zzip32-postinstall DESTDIR=%{buildroot}
115 %__make zzip-postinstall
116 %__make install-doc DESTDIR=%{buildroot}
117 %__make install-mans DESTDIR=%{buildroot}
118 %__make install-sdl DESTDIR=%{buildroot}
119
120 %clean
121 %__rm -rf %{buildroot}
122
123 %files %lib
124       %defattr(-,root,root)
125       %{_libdir}/lib*.so.*
126
127 %post %lib
128 /sbin/ldconfig || true
129 %postun %lib
130 /sbin/ldconfig || true
131
132 %files doc
133       %defattr(-,root,root)
134       %{_datadir}/doc/*
135 %dir  %{_datadir}/omf/%{name}
136       %{_datadir}/omf/%{name}/*
137
138 %post doc
139 test ! -f %_bindir/scrollkeeper-update || %_bindir/scrollkeeper-update
140 %postun doc
141 test ! -f %_bindir/scrollkeeper-update || %_bindir/scrollkeeper-update
142
143 %files devel
144       %defattr(-,root,root)
145       %{_bindir}/*
146 %dir  %{_includedir}/zzip
147       %{_includedir}/zzip/*
148       %{_includedir}/*.h
149       %{_libdir}/lib*.so
150       %{_libdir}/lib*.a
151       %{_libdir}/lib*.la
152       %{_libdir}/pkgconfig/zzip*
153       %{_datadir}/aclocal/%{name}*.m4
154       %{_mandir}/man3/*
155
156 %files SDL_rwops-devel
157       %defattr(-,root,root)
158       %{_libdir}/pkgconfig/SDL*zzip*
159 %dir  %{_includedir}/SDL_rwops_zzip
160       %{_includedir}/SDL_rwops_zzip/*
161