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