]> git.pld-linux.org Git - projects/template-specs.git/blob - template.spec
- there is no wrapping in summaries or dumb 5-words descriptions
[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 Source0:        %{name}-%{version}.tar.gz
14 # Source0-md5:  -
15 #Source1:       -
16 # Source1-md5:  -
17 #Patch0:                %{name}-DESTDIR.patch
18 URL:            -
19 %if %{with initscript}
20 BuildRequires:  rpmbuild(macros) >= 1.228
21 Requires(post,preun):   /sbin/chkconfig
22 Requires:       rc-scripts
23 %endif
24 #BuildRequires: -
25 #BuildRequires: autoconf
26 #BuildRequires: automake
27 #BuildRequires: intltool
28 #BuildRequires: libtool
29 #Requires(postun):      -
30 #Requires(pre,post):    -
31 #Requires(preun):       -
32 #Requires:      -
33 #Provides:      -
34 #Provides:      group(foo)
35 #Provides:      user(foo)
36 #Obsoletes:     -
37 #Conflicts:     -
38 #BuildArch:     noarch
39 #ExclusiveArch: %{ix86}
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43
44 %description -l pl.UTF-8
45
46 %package subpackage
47 Summary:        -
48 Summary(pl.UTF-8):      -
49 Group:          -
50
51 %description subpackage
52
53 %description subpackage -l pl.UTF-8
54
55 %package libs
56 Summary:        -
57 Summary(pl.UTF-8):      -
58 Group:          Libraries
59
60 %description libs
61
62 %description libs -l pl.UTF-8
63
64 %package devel
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}
72
73 %description devel
74 Header files for %{name} library.
75
76 %description devel -l pl.UTF-8
77 Pliki nagłówkowe biblioteki %{name}.
78
79 %package static
80 Summary:        Static %{name} library
81 Summary(pl.UTF-8):      Statyczna biblioteka %{name}
82 Group:          Development/Libraries
83 Requires:       %{name}-devel = %{version}-%{release}
84
85 %description static
86 Static %{name} library.
87
88 %description static -l pl.UTF-8
89 Statyczna biblioteka %{name}.
90
91 %prep
92 %setup -q
93 #%setup -q -c -T
94 #%setup -q -n %{name}
95 #%setup -q -n %{name}-%{version}.orig -a 1
96 #%patch0 -p1
97
98 # undos the source
99 #find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
100
101 # remove CVS control files
102 #find -name CVS -print0 | xargs -0 rm -rf
103
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
107
108 %build
109 # if ac/am/* rebuilding is necessary, do it in this order and add
110 # appropriate BuildRequires
111 #%{__intltoolize}
112 #%{__gettextize}
113 #%{__libtoolize}
114 #%{__aclocal}
115 #%{__autoconf}
116 #%{__autoheader}
117 #%{__automake}
118 # if not running libtool or automake, but config.sub is too old:
119 #cp -f /usr/share/automake/config.sub .
120 %configure
121 %{__make}
122
123 #%{__make} \
124 #       CFLAGS="%{rpmcflags}" \
125 #       LDFLAGS="%{rpmldflags}"
126
127 %{?with_tests:%{__make} test}
128
129 %install
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}
135 %endif
136 #install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
137
138 %{__make} install \
139         DESTDIR=$RPM_BUILD_ROOT
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %pre
145 %groupadd -g xxx %{name}
146 %useradd -u xxx -d /var/lib/%{name} -g %{name} -c "XXX User" %{name}
147
148 %post
149
150 %preun
151
152 %postun
153 if [ "$1" = "0" ]; then
154         %userremove %{name}
155         %groupremove %{name}
156 fi
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
169 if [ "$1" = "0" ]; then
170         %service -q %{name} stop
171         /sbin/chkconfig --del %{name}
172 fi
173 %endif
174
175 %files
176 %defattr(644,root,root,755)
177 %doc AUTHORS CREDITS CHANGES ChangeLog NEWS README THANKS TODO
178
179 %if 0
180 # if _sysconfdir != /etc:
181 #%%dir %{_sysconfdir}
182 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
183 %attr(755,root,root) %{_bindir}/%{name}*
184 %{_datadir}/%{name}
185 %endif
186
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}
191 %endif
192
193 #%{_examplesdir}/%{name}-%{version}
194
195 %if %{with subpackage}
196 %files subpackage
197 %defattr(644,root,root,755)
198 #%doc extras/*.gz
199 #%{_datadir}/%{name}-ext
200 %endif
This page took 0.242391 seconds and 3 git commands to generate.