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