1 | #define svn_url F:/rd/ports/cron2/trunk
|
---|
2 | %scm_source svn http://svn.netlabs.org/repos/ports/cron2/trunk 2323
|
---|
3 |
|
---|
4 | %define kmk_dist out/os2.x86/release/dist
|
---|
5 |
|
---|
6 | Summary: daemon to execute scheduled commands
|
---|
7 | Name: cron2
|
---|
8 | Version: 1.4.2
|
---|
9 | Release: 1%{?dist}
|
---|
10 | License: This is a FreeWare product.
|
---|
11 | Group: Development/Libraries
|
---|
12 |
|
---|
13 | Requires: libc >= 0.6.6
|
---|
14 |
|
---|
15 | %description
|
---|
16 | CRON/2, client/server-based timed program execution.
|
---|
17 |
|
---|
18 | %debug_package
|
---|
19 |
|
---|
20 | %prep
|
---|
21 | %scm_setup
|
---|
22 |
|
---|
23 | %global kmk_flags CFLAGS="%{optflags}" LDFLAGS=-Zhigh-mem KBUILD_VERBOSE=2 BUILD_TYPE=release INST_PREFIX="%{_prefix}"
|
---|
24 |
|
---|
25 | %build
|
---|
26 | kmk -C src %{kmk_flags}
|
---|
27 | kmk -C src install
|
---|
28 |
|
---|
29 | %install
|
---|
30 | rm -rf %{buildroot}
|
---|
31 | mkdir -p %{buildroot}%{_bindir}
|
---|
32 | mkdir -p %{buildroot}%{_sysconfdir}
|
---|
33 | mkdir -p %{buildroot}%{_localstatedir}/log
|
---|
34 |
|
---|
35 | cp %{kmk_dist}/bin/at.exe %{buildroot}%{_bindir}/at.exe
|
---|
36 | cp %{kmk_dist}/bin/cron2.exe %{buildroot}%{_bindir}/cron2.exe
|
---|
37 | cp src/cron2.dat %{buildroot}%{_sysconfdir}/cron2.dat
|
---|
38 |
|
---|
39 | # Ghost config files:
|
---|
40 | touch ${RPM_BUILD_ROOT}%{_localstatedir}/log/cron2.log
|
---|
41 |
|
---|
42 | %clean
|
---|
43 | rm -rf %{buildroot}
|
---|
44 |
|
---|
45 | %post
|
---|
46 | if [ "$1" -ge 1 ]; then # (upon update)
|
---|
47 | %wps_object_delete_all
|
---|
48 | fi
|
---|
49 | %wps_object_create_begin
|
---|
50 | 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;
|
---|
51 | WP_START_CRON2_EXEC:WPShadow|Cron/2 Daemon|<WP_START>|SHADOWID=<WP_TOOLS_CRON2_EXEC>
|
---|
52 |
|
---|
53 | %wps_object_create_end
|
---|
54 |
|
---|
55 | %postun
|
---|
56 | if [ "$1" = "0" ]; then
|
---|
57 | %wps_object_delete_all
|
---|
58 | fi
|
---|
59 |
|
---|
60 | %files
|
---|
61 | %defattr(-,root,root)
|
---|
62 | %doc src/cron2.doc
|
---|
63 | %doc src/cron2.ico
|
---|
64 | %{_bindir}/*.exe
|
---|
65 | %config(noreplace) %{_sysconfdir}/cron2.dat
|
---|
66 | %ghost %{_localstatedir}/log/cron2.log
|
---|
67 |
|
---|
68 | %changelog
|
---|
69 | * Fri Jan 18 2019 yd <yd@os2power.com> 1.4.2-2
|
---|
70 | - fixed dat file parsing
|
---|
71 |
|
---|
72 | * Tue Aug 25 2015 yd <yd@os2power.com> 1.4.2-1
|
---|
73 | - initial build with unixroot support for /@unixroot/etc/cron2.dat and default
|
---|
74 | logging to /@unixroot/var/log/cron2.log.
|
---|
75 |
|
---|