1 | #define svn_url F:/rd/ports/cron2/trunk
|
---|
2 | %define svn_url http://svn.netlabs.org/repos/ports/cron2/trunk
|
---|
3 | %define svn_rev 1163
|
---|
4 |
|
---|
5 | %define kmk_dist out/os2.x86/release/dist
|
---|
6 |
|
---|
7 | Summary: daemon to execute scheduled commands
|
---|
8 | Name: cron2
|
---|
9 | Version: 1.4.2
|
---|
10 | Release: 0.0%{?dist}
|
---|
11 | License: This is a FreeWare product.
|
---|
12 | Group: Development/Libraries
|
---|
13 |
|
---|
14 | Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip
|
---|
15 |
|
---|
16 | Requires: libc >= 0.6.6
|
---|
17 |
|
---|
18 | %description
|
---|
19 | CRON/2, client/server-based timed program execution.
|
---|
20 |
|
---|
21 | %debug_package
|
---|
22 |
|
---|
23 | %prep
|
---|
24 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
---|
25 | %setup -q
|
---|
26 | %else
|
---|
27 | %setup -n "%{name}-%{version}" -Tc
|
---|
28 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
---|
29 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
---|
30 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
---|
31 | %endif
|
---|
32 |
|
---|
33 | %build
|
---|
34 | export KCFLAGS="%{optflags}"
|
---|
35 | kmk -C src
|
---|
36 | kmk -C src install
|
---|
37 |
|
---|
38 | %install
|
---|
39 | rm -rf %{buildroot}
|
---|
40 | mkdir -p %{buildroot}%{_bindir}
|
---|
41 | mkdir -p %{buildroot}%{_sysconfdir}
|
---|
42 | mkdir -p %{buildroot}%{_localstatedir}/log
|
---|
43 |
|
---|
44 | cp %{kmk_dist}/bin/at.exe %{buildroot}%{_bindir}/at.exe
|
---|
45 | cp %{kmk_dist}/bin/cron2.exe %{buildroot}%{_bindir}/cron2.exe
|
---|
46 | cp src/cron2.dat %{buildroot}%{_sysconfdir}/cron2.dat
|
---|
47 |
|
---|
48 | # Ghost config files:
|
---|
49 | touch ${RPM_BUILD_ROOT}%{_localstatedir}/log/cron2.log
|
---|
50 |
|
---|
51 | %clean
|
---|
52 | rm -rf %{buildroot}
|
---|
53 |
|
---|
54 | %post
|
---|
55 | %wps_object_create_begin
|
---|
56 | WP_TOOLS_CRON2_EXEC:WPProgram|Cron/2 Daemon|<WP_TOOLS>|EXENAME=((%_bindir/cron2.exe));STARTUPDIR=((%_bindir));ICONFILE=((%_defaultdocdir/%name-%version/cron2.ico));TITLE=Cron/2 Daemon;
|
---|
57 | WP_START_CRON2_EXEC:WPShadow|Cron/2 Daemon|<WP_START>|SHADOWID=<WP_TOOLS_CRON2_EXEC>
|
---|
58 |
|
---|
59 | %wps_object_create_end
|
---|
60 |
|
---|
61 | %postun
|
---|
62 | %wps_object_delete_all
|
---|
63 |
|
---|
64 | %files
|
---|
65 | %defattr(-,root,root)
|
---|
66 | %doc src/cron2.doc
|
---|
67 | %doc src/cron2.ico
|
---|
68 | %{_bindir}/*.exe
|
---|
69 | %config(noreplace) %{_sysconfdir}/cron2.dat
|
---|
70 | %ghost %{_localstatedir}/log/cron2.log
|
---|
71 |
|
---|
72 | %changelog
|
---|
73 | * Tue Aug 25 2015 yd <yd@os2power.com> 1.4.2-1
|
---|
74 | - initial build with unixroot support for /@unixroot/etc/cron2.dat and default
|
---|
75 | logging to /@unixroot/var/log/cron2.log.
|
---|
76 |
|
---|