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