]>
Commit | Line | Data |
---|---|---|
9694f259 | 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: g3dviewer | |
9 | Version: 0.2.99.4 | |
10 | Release: 0.1 | |
11 | License: GPL | |
12 | Group: Applications | |
13 | Source0: http://automagically.de/files/%{name}-%{version}.tar.gz | |
14 | # Source0-md5: b7da4a68dd18309805ea2ca081542cfd | |
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 | |
6be03707 | 24 | BuildRequires: libg3d-devel =>0.0.8 |
25 | BuildRequires: glib2-devel >= 2.4.0 | |
26 | BuildRequires: gtk+2-devel >= 2.4.0 | |
27 | BuildRequires: pkg-config | |
9694f259 | 28 | #BuildRequires: autoconf |
29 | #BuildRequires: automake | |
30 | #BuildRequires: intltool | |
31 | #BuildRequires: libtool | |
32 | #Requires(postun): - | |
33 | #Requires(pre,post): - | |
34 | #Requires(preun): - | |
35 | #Requires: - | |
36 | #Provides: - | |
37 | #Provides: group(foo) | |
38 | #Provides: user(foo) | |
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.UTF-8 | |
48 | ||
49 | %package subpackage | |
50 | Summary: - | |
51 | Summary(pl.UTF-8): - | |
52 | Group: - | |
53 | ||
54 | %description subpackage | |
55 | ||
56 | %description subpackage -l pl.UTF-8 | |
57 | ||
58 | %package libs | |
59 | Summary: - | |
60 | Summary(pl.UTF-8): - | |
61 | Group: Libraries | |
62 | ||
63 | %description libs | |
64 | ||
65 | %description libs -l pl.UTF-8 | |
66 | ||
67 | %package devel | |
68 | Summary: Header files for ... library | |
69 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki ... | |
70 | Group: Development/Libraries | |
71 | # if base package contains shared library for which these headers are | |
72 | #Requires: %{name} = %{version}-%{release} | |
73 | # if -libs package contains shared library for which these headers are | |
74 | #Requires: %{name}-libs = %{version}-%{release} | |
75 | ||
76 | %description devel | |
77 | Header files for ... library. | |
78 | ||
79 | %description devel -l pl.UTF-8 | |
80 | Pliki nagłówkowe biblioteki .... | |
81 | ||
82 | %package static | |
83 | Summary: Static ... library | |
84 | Summary(pl.UTF-8): Statyczna biblioteka ... | |
85 | Group: Development/Libraries | |
86 | Requires: %{name}-devel = %{version}-%{release} | |
87 | ||
88 | %description static | |
89 | Static ... library. | |
90 | ||
91 | %description static -l pl.UTF-8 | |
92 | Statyczna biblioteka .... | |
93 | ||
94 | %prep | |
95 | %setup -q | |
96 | #%setup -q -c -T | |
97 | #%setup -q -n %{name} | |
98 | #%setup -q -n %{name}-%{version}.orig -a 1 | |
99 | #%patch0 -p1 | |
100 | ||
101 | # undos the source | |
102 | #find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,' | |
103 | ||
104 | # remove CVS control files | |
105 | #find -name CVS -print0 | xargs -0 rm -rf | |
106 | ||
107 | # you'll need this if you cp -a complete dir in source | |
108 | # cleanup backups after patching | |
109 | find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f | |
110 | ||
111 | %build | |
112 | # if ac/am/* rebuilding is necessary, do it in this order and add | |
113 | # appropriate BuildRequires | |
114 | #%{__intltoolize} | |
115 | #%{__gettextize} | |
116 | #%{__libtoolize} | |
117 | #%{__aclocal} | |
118 | #%{__autoconf} | |
119 | #%{__autoheader} | |
120 | #%{__automake} | |
121 | # if not running libtool or automake, but config.sub is too old: | |
122 | #cp -f /usr/share/automake/config.sub . | |
123 | %configure | |
124 | %{__make} | |
125 | ||
126 | #%{__make} \ | |
127 | # CFLAGS="%{rpmcflags}" \ | |
128 | # LDFLAGS="%{rpmldflags}" | |
129 | ||
130 | %{?with_tests:%{__make} test} | |
131 | ||
132 | %install | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | # create directories if necessary | |
135 | #install -d $RPM_BUILD_ROOT | |
136 | %if %{with initscript} | |
137 | install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d} | |
138 | %endif | |
139 | #install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
140 | ||
141 | %{__make} install \ | |
142 | DESTDIR=$RPM_BUILD_ROOT | |
143 | ||
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
147 | %pre | |
148 | %groupadd -g xxx %{name} | |
149 | %useradd -u xxx -d /var/lib/%{name} -g %{name} -c "XXX User" %{name} | |
150 | ||
151 | %post | |
152 | ||
153 | %preun | |
154 | ||
155 | %postun | |
156 | if [ "$1" = "0" ]; then | |
157 | %userremove %{name} | |
158 | %groupremove %{name} | |
159 | fi | |
160 | ||
161 | %if %{with ldconfig} | |
162 | %post -p /sbin/ldconfig | |
163 | %postun -p /sbin/ldconfig | |
164 | %endif | |
165 | ||
166 | %if %{with initscript} | |
167 | %post init | |
168 | /sbin/chkconfig --add %{name} | |
169 | %service %{name} restart | |
170 | ||
171 | %preun init | |
172 | if [ "$1" = "0" ]; then | |
173 | %service -q %{name} stop | |
174 | /sbin/chkconfig --del %{name} | |
175 | fi | |
176 | %endif | |
177 | ||
178 | %files | |
179 | %defattr(644,root,root,755) | |
180 | %doc AUTHORS CREDITS CHANGES ChangeLog NEWS README THANKS TODO | |
181 | ||
182 | %if 0 | |
183 | # if _sysconfdir != /etc: | |
184 | #%%dir %{_sysconfdir} | |
185 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/* | |
186 | %attr(755,root,root) %{_bindir}/* | |
187 | %{_datadir}/%{name} | |
188 | %endif | |
189 | ||
190 | # initscript and its config | |
191 | %if %{with initscript} | |
192 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
193 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
194 | %endif | |
195 | ||
196 | #%{_examplesdir}/%{name}-%{version} | |
197 | ||
198 | %if %{with subpackage} | |
199 | %files subpackage | |
200 | %defattr(644,root,root,755) | |
201 | #%doc extras/*.gz | |
202 | #%{_datadir}/%{name}-ext | |
203 | %endif |