3 %bcond_with tests # build with tests
4 %bcond_without tests # build without tests
11 License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
13 Source0: %{name}-%{version}.tar.gz
17 #Patch0: %{name}-DESTDIR.patch
19 %if %{with initscript}
20 BuildRequires: rpmbuild(macros) >= 1.228
21 Requires(post,preun): /sbin/chkconfig
25 #BuildRequires: autoconf
26 #BuildRequires: automake
27 #BuildRequires: intltool
28 #BuildRequires: libtool
30 #Requires(pre,post): -
39 #ExclusiveArch: %{ix86}
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 %description -l pl.UTF-8
51 %description subpackage
53 %description subpackage -l pl.UTF-8
62 %description libs -l pl.UTF-8
65 Summary: Header files for %{name} library
66 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
67 Group: Development/Libraries
68 # if base package contains shared library for which these headers are
69 #Requires: %{name} = %{version}-%{release}
70 # if -libs package contains shared library for which these headers are
71 #Requires: %{name}-libs = %{version}-%{release}
74 Header files for %{name} library.
76 %description devel -l pl.UTF-8
77 Pliki nagłówkowe biblioteki %{name}.
80 Summary: Static %{name} library
81 Summary(pl.UTF-8): Statyczna biblioteka %{name}
82 Group: Development/Libraries
83 Requires: %{name}-devel = %{version}-%{release}
86 Static %{name} library.
88 %description static -l pl.UTF-8
89 Statyczna biblioteka %{name}.
95 #%setup -q -n %{name}-%{version}.orig -a 1
99 #find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
101 # remove CVS control files
102 #find -name CVS -print0 | xargs -0 rm -rf
104 # you'll need this if you cp -a complete dir in source
105 # cleanup backups after patching
106 find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
109 # if ac/am/* rebuilding is necessary, do it in this order and add
110 # appropriate BuildRequires
118 # if not running libtool or automake, but config.sub is too old:
119 #cp -f /usr/share/automake/config.sub .
124 # CFLAGS="%{rpmcflags}" \
125 # LDFLAGS="%{rpmldflags}"
127 %{?with_tests:%{__make} test}
130 rm -rf $RPM_BUILD_ROOT
131 # create directories if necessary
132 #install -d $RPM_BUILD_ROOT
133 %if %{with initscript}
134 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
136 #install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
139 DESTDIR=$RPM_BUILD_ROOT
142 rm -rf $RPM_BUILD_ROOT
145 %groupadd -g xxx %{name}
146 %useradd -u xxx -d /var/lib/%{name} -g %{name} -c "XXX User" %{name}
153 if [ "$1" = "0" ]; then
159 %post -p /sbin/ldconfig
160 %postun -p /sbin/ldconfig
163 %if %{with initscript}
165 /sbin/chkconfig --add %{name}
166 %service %{name} restart
169 if [ "$1" = "0" ]; then
170 %service -q %{name} stop
171 /sbin/chkconfig --del %{name}
176 %defattr(644,root,root,755)
177 %doc AUTHORS CREDITS CHANGES ChangeLog NEWS README THANKS TODO
180 # if _sysconfdir != /etc:
181 #%%dir %{_sysconfdir}
182 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
183 %attr(755,root,root) %{_bindir}/%{name}*
187 # initscript and its config
188 %if %{with initscript}
189 %attr(754,root,root) /etc/rc.d/init.d/%{name}
190 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
193 #%{_examplesdir}/%{name}-%{version}
195 %if %{with subpackage}
197 %defattr(644,root,root,755)
199 #%{_datadir}/%{name}-ext