]> git.pld-linux.org Git - projects/template-specs.git/blame - template.spec
pecl: add example how to make failed tests as XFAIL
[projects/template-specs.git] / template.spec
CommitLineData
52ff2772 1#
66c7fa65
ER
2# Conditional build:
3%bcond_with tests # build with tests
4%bcond_without tests # build without tests
52ff2772 5#
e8b9df06 6Summary: -
ce39d734 7Summary(pl.UTF-8): -
5e539df2
ER
8Name: template
9Version: _
c1981b58 10Release: 0.1
72aa6361 11License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here)
4b97f9d0 12Group: Applications
e4db0ab6 13# SF URL: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
a7c6d5bc 14# github URL https://github.com/USER/PROJECT/archive/v%{version}/%{name}-%{version}.tar.gz
f1b2d418 15Source0: %{name}-%{version}.tar.gz
023a0cc4 16# Source0-md5: -
4b97f9d0 17#Source1: -
023a0cc4 18# Source1-md5: -
49683e54 19#Patch0: %{name}-DESTDIR.patch
e8b9df06 20URL: -
c0c12927
ER
21%if %{with initscript}
22BuildRequires: rpmbuild(macros) >= 1.228
c0c12927 23Requires(post,preun): /sbin/chkconfig
b411d35c 24Requires: rc-scripts
c0c12927 25%endif
87302e56
JR
26%if %{with systemd_service}
27BuildRequires: rpmbuild(macros) >= 1.647
28Requires(post,preun,postun): systemd-units >= 38
29Requires: systemd-units >= 0.38
30%endif
5e539df2 31#BuildRequires: -
6d0e4f88 32#BuildRequires: autoconf
fdeb11aa 33#BuildRequires: automake
bd5b2cfe 34#BuildRequires: intltool
6d0e4f88 35#BuildRequires: libtool
5e539df2 36#Requires(postun): -
4b97f9d0
ER
37#Requires(pre,post): -
38#Requires(preun): -
4b97f9d0 39#Requires: -
44d5bb3a 40#Provides: -
c0c12927
ER
41#Provides: group(foo)
42#Provides: user(foo)
4b97f9d0
ER
43#Obsoletes: -
44#Conflicts: -
c1981b58 45#BuildArch: noarch
5e539df2 46#ExclusiveArch: %{ix86}
e8b9df06
SZ
47BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49%description
50
9be49f18 51%description -l pl.UTF-8
e8b9df06 52
352b3a3c
TP
53%package subpackage
54Summary: -
ce39d734 55Summary(pl.UTF-8): -
352b3a3c 56Group: -
2c0f2034
ER
57# noarch subpackages only when building with rpm5
58%if "%{_rpmversion}" >= "5"
59BuildArch: noarch
60%endif
352b3a3c
TP
61
62%description subpackage
63
9be49f18 64%description subpackage -l pl.UTF-8
352b3a3c 65
5261abf9
ER
66%package libs
67Summary: -
ce39d734 68Summary(pl.UTF-8): -
5261abf9
ER
69Group: Libraries
70
71%description libs
72
9be49f18 73%description libs -l pl.UTF-8
5261abf9 74
88a5dbe9 75%package devel
ca8abdb7
TP
76Summary: Header files for %{name} library
77Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
88a5dbe9 78Group: Development/Libraries
9a2e1218 79# if base package contains shared library for which these headers are
49683e54 80#Requires: %{name} = %{version}-%{release}
9a2e1218
JB
81# if -libs package contains shared library for which these headers are
82#Requires: %{name}-libs = %{version}-%{release}
88a5dbe9
ER
83
84%description devel
ca8abdb7 85Header files for %{name} library.
c934cc1b 86
9be49f18 87%description devel -l pl.UTF-8
ca8abdb7 88Pliki nagłówkowe biblioteki %{name}.
88a5dbe9
ER
89
90%package static
ca8abdb7
TP
91Summary: Static %{name} library
92Summary(pl.UTF-8): Statyczna biblioteka %{name}
88a5dbe9 93Group: Development/Libraries
c0c12927 94Requires: %{name}-devel = %{version}-%{release}
88a5dbe9
ER
95
96%description static
28aa1722 97Static %{name} library.
c0c12927 98
9be49f18 99%description static -l pl.UTF-8
28aa1722 100Statyczna biblioteka %{name}.
c934cc1b 101
e8b9df06 102%prep
c0c12927
ER
103%setup -q
104#%setup -q -c -T
105#%setup -q -n %{name}
10428dcb 106#%setup -q -n %{name}-%{version}.orig -a 1
4b97f9d0 107#%patch0 -p1
e8b9df06 108
c0c12927 109# undos the source
5309e6bb 110#find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
c0c12927
ER
111
112# remove CVS control files
113#find -name CVS -print0 | xargs -0 rm -rf
114
c2bc0219
ER
115# you'll need this if you cp -a complete dir in source
116# cleanup backups after patching
53eee976 117find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
c2bc0219 118
e8b9df06 119%build
c42a30cf
JB
120# if ac/am/* rebuilding is necessary, do it in this order and add
121# appropriate BuildRequires
ee7be565
ER
122#%{__intltoolize}
123#%{__gettextize}
124#%{__libtoolize}
125#%{__aclocal}
126#%{__autoconf}
127#%{__autoheader}
128#%{__automake}
f5f1d924 129# if not running libtool or automake, but config.sub is too old:
de41dae9 130#cp -f /usr/share/automake/config.sub .
19bf1c4b 131%configure
e8b9df06
SZ
132%{__make}
133
c0c12927
ER
134#%{__make} \
135# CFLAGS="%{rpmcflags}" \
136# LDFLAGS="%{rpmldflags}"
137
a5f05060
ER
138%{?with_tests:%{__make} test}
139
e8b9df06
SZ
140%install
141rm -rf $RPM_BUILD_ROOT
d43856e1
JB
142# create directories if necessary
143#install -d $RPM_BUILD_ROOT
b411d35c
ER
144%if %{with initscript}
145install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
146%endif
c0c12927 147#install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
e8b9df06 148
a984843b
SP
149%{__make} install \
150 DESTDIR=$RPM_BUILD_ROOT
e8b9df06 151
f5bb3874
JB
152%clean
153rm -rf $RPM_BUILD_ROOT
154
e8b9df06 155%pre
ba57de51
ER
156%groupadd -g xxx %{name}
157%useradd -u xxx -d /var/lib/%{name} -g %{name} -c "XXX User" %{name}
e8b9df06 158
e8b9df06
SZ
159%post
160
b187ef53
JB
161%preun
162
e8b9df06 163%postun
ba57de51
ER
164if [ "$1" = "0" ]; then
165 %userremove %{name}
166 %groupremove %{name}
167fi
c0c12927
ER
168
169%if %{with ldconfig}
170%post -p /sbin/ldconfig
171%postun -p /sbin/ldconfig
172%endif
173
174%if %{with initscript}
87302e56 175%post
c0c12927
ER
176/sbin/chkconfig --add %{name}
177%service %{name} restart
178
87302e56 179%preun
c0c12927
ER
180if [ "$1" = "0" ]; then
181 %service -q %{name} stop
182 /sbin/chkconfig --del %{name}
183fi
184%endif
e8b9df06 185
87302e56
JR
186%if %{with systemd_service}
187%post
188%systemd_post %{name}.service
189
190%preun
191%systemd_preun %{name}.service
192
193%postun
194%systemd_reload
195%endif
196
e8b9df06
SZ
197%files
198%defattr(644,root,root,755)
5dda8307 199%doc AUTHORS CREDITS CHANGES ChangeLog NEWS README THANKS TODO
cec32492 200
5e539df2 201%if 0
11877175
ER
202# if _sysconfdir != /etc:
203#%%dir %{_sysconfdir}
9c3f0ed0 204%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
28aa1722 205%attr(755,root,root) %{_bindir}/%{name}*
0b279ca0 206%{_datadir}/%{name}
5e539df2 207%endif
f1b2d418 208
d1184c8c 209# initscript and its config
5e539df2 210%if %{with initscript}
2482ba2c 211%attr(754,root,root) /etc/rc.d/init.d/%{name}
9c3f0ed0 212%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
5e539df2 213%endif
2482ba2c 214
87302e56
JR
215%if %{with systemd_service}
216%{systemdunitdir}/%{name}.service
217%endif
218
c0c12927
ER
219#%{_examplesdir}/%{name}-%{version}
220
49683e54 221%if %{with subpackage}
f1b2d418
TP
222%files subpackage
223%defattr(644,root,root,755)
5e539df2
ER
224#%doc extras/*.gz
225#%{_datadir}/%{name}-ext
49683e54 226%endif
This page took 0.107509 seconds and 4 git commands to generate.