]> git.pld-linux.org Git - projects/template-specs.git/blob - template.spec
- require rc-scripts at runtime using plain Requires;
[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):    -
8 Name:           -
9 Version:        -
10 Release:        0.1
11 Epoch:          0
12 License:        - (enter GPL/GPL v2/LGPL/BSD/BSD-like/other license name here)
13 #Vendor:                -
14 Group:          Applications
15 #Icon:          -
16 Source0:        %{name}-%{version}.tar.gz
17 # Source0-md5:  -
18 #Source1:       -
19 # Source1-md5:  -
20 #Patch0:                %{name}-what.patch
21 URL:            -
22 %if %{with initscript}
23 BuildRequires:  rpmbuild(macros) >= 1.228
24 Requires(post,preun):   /sbin/chkconfig
25 Requires:       rc-scripts
26 %endif
27 #BuildRequires: autoconf
28 #BuildRequires: automake
29 #BuildRequires: libtool
30 #BuildRequires: -
31 #PreReq:                -
32 #Requires(pre,post):    -
33 #Requires(preun):       -
34 #Requires(postun):      -
35 #Requires:      -
36 #Provides:      group(foo)
37 #Provides:      user(foo)
38 #Provides:      -
39 #Obsoletes:     -
40 #Conflicts:     -
41 #BuildArch:     noarch
42 #ExclusiveArch:  %{ix86}
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46
47 %description -l pl
48
49 %package subpackage
50 Summary:        -
51 Summary(pl):    -
52 Group:          -
53
54 %description subpackage
55
56 %description subpackage -l pl
57
58 %if %{with devel-static}
59 %package devel
60 Summary:        Development libraries and header files for ... library
61 Group:          Development/Libraries
62
63 %description devel
64 This is the package containing the development libraries and header
65 files for ...
66
67 %package static
68 Summary:        Static ... library
69 Group:          Development/Libraries
70 Requires:       %{name}-devel = %{version}-%{release}
71
72 %description static
73 Static ... library.
74
75 %endif
76
77 %prep
78 %setup -q
79 #%setup -q -c -T
80 #%setup -q -n %{name}
81 #%%setup -q -n %{name}-%{version}.orig -a 1
82 #%patch0 -p1
83
84 # undos the source
85 #find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 sed -i -e 's,
86 $,,'
87
88 # remove CVS control files
89 #find -name CVS -print0 | xargs -0 rm -rf
90
91 %build
92 # if ac/am/* rebuilding is necessary, do it in this order and add
93 # appropriate BuildRequires
94 #%%{__gettextize}
95 #%%{__libtoolize}
96 #%%{__aclocal}
97 #%%{__autoconf}
98 #%%{__autoheader}
99 #%%{__automake}
100 #cp -f /usr/share/automake/config.sub .
101 %configure
102 %{__make}
103
104 #%{__make} \
105 #       CFLAGS="%{rpmcflags}" \
106 #       LDFLAGS="%{rpmldflags}"
107
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 # create directories if necessary
111 #install -d $RPM_BUILD_ROOT
112 #install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
113
114 %{__make} install \
115         DESTDIR=$RPM_BUILD_ROOT
116
117 %clean
118 rm -rf $RPM_BUILD_ROOT
119
120 %pre
121
122 %post
123
124 %preun
125
126 %postun
127
128 %if %{with ldconfig}
129 %post   -p /sbin/ldconfig
130 %postun -p /sbin/ldconfig
131 %endif
132
133 %if %{with initscript}
134 %post init
135 /sbin/chkconfig --add %{name}
136 %service %{name} restart
137
138 %preun init
139 if [ "$1" = "0" ]; then
140         %service -q %{name} stop
141         /sbin/chkconfig --del %{name}
142 fi
143 %endif
144
145 %files
146 %defattr(644,root,root,755)
147 %doc AUTHORS CREDITS ChangeLog NEWS README THANKS TODO
148
149 # if _sysconfdir != /etc:
150 #%%dir %{_sysconfdir}
151 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*
152
153 %attr(755,root,root) %{_bindir}/*
154
155 %{_datadir}/%{name}
156
157 # initscript and its config
158 %attr(754,root,root) /etc/rc.d/init.d/%{name}
159 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
160
161 #%{_examplesdir}/%{name}-%{version}
162
163 %files subpackage
164 %defattr(644,root,root,755)
165 %doc extras/*.gz
166 %{_datadir}/%{name}-ext
This page took 0.070273 seconds and 4 git commands to generate.