| 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: unlink rename pending operation
|
|---|
| 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 | %package debug
|
|---|
| 22 | Summary: HLL debug data for exception handling support.
|
|---|
| 23 | Requires: %{name} = %{version}-%{release}
|
|---|
| 24 |
|
|---|
| 25 | %description debug
|
|---|
| 26 | HLL debug data for exception handling support.
|
|---|
| 27 |
|
|---|
| 28 | %prep
|
|---|
| 29 | %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}
|
|---|
| 30 | %setup -q
|
|---|
| 31 | %else
|
|---|
| 32 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 33 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 34 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 35 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 36 | %endif
|
|---|
| 37 |
|
|---|
| 38 | %build
|
|---|
| 39 | export KCFLAGS="%{optflags}"
|
|---|
| 40 | kmk -C src
|
|---|
| 41 | kmk -C src install
|
|---|
| 42 |
|
|---|
| 43 | %install
|
|---|
| 44 | rm -rf %{buildroot}
|
|---|
| 45 | mkdir -p %{buildroot}%{_bindir}
|
|---|
| 46 | mkdir -p %{buildroot}%{_sysconfdir}
|
|---|
| 47 | mkdir -p %{buildroot}%{_localstatedir}/log
|
|---|
| 48 |
|
|---|
| 49 | cp %{kmk_dist}/bin/at.exe %{buildroot}%{_bindir}/at.exe
|
|---|
| 50 | cp %{kmk_dist}/bin/cron2.exe %{buildroot}%{_bindir}/cron2.exe
|
|---|
| 51 | cp src/cron2.dat %{buildroot}%{_sysconfdir}/cron2.dat
|
|---|
| 52 |
|
|---|
| 53 | # Ghost config files:
|
|---|
| 54 | touch ${RPM_BUILD_ROOT}%{_localstatedir}/log/cron2.log
|
|---|
| 55 |
|
|---|
| 56 | %clean
|
|---|
| 57 | rm -rf %{buildroot}
|
|---|
| 58 |
|
|---|
| 59 | %post
|
|---|
| 60 | %wps_object_create_begin
|
|---|
| 61 | 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;
|
|---|
| 62 | WP_START_CRON2_EXEC:WPShadow|Cron/2 Daemon|<WP_START>|SHADOWID=<WP_TOOLS_CRON2_EXEC>
|
|---|
| 63 |
|
|---|
| 64 | %wps_object_create_end
|
|---|
| 65 |
|
|---|
| 66 | %postun
|
|---|
| 67 | %wps_object_delete_all
|
|---|
| 68 |
|
|---|
| 69 | %files
|
|---|
| 70 | %defattr(-,root,root)
|
|---|
| 71 | %doc src/cron2.doc
|
|---|
| 72 | %doc src/cron2.ico
|
|---|
| 73 | %{_bindir}/*.exe
|
|---|
| 74 | %config(noreplace) %{_sysconfdir}/cron2.dat
|
|---|
| 75 | %ghost %{_localstatedir}/log/cron2.log
|
|---|
| 76 |
|
|---|
| 77 | %files debug
|
|---|
| 78 | %defattr(-,root,root)
|
|---|
| 79 | %{_bindir}/*.dbg
|
|---|
| 80 |
|
|---|
| 81 | %changelog
|
|---|
| 82 | * Tue Aug 25 2015 yd <yd@os2power.com> 1.4.2-1
|
|---|
| 83 | - initial build with unixroot support for /@unixroot/etc/cron2.dat and default
|
|---|
| 84 | logging to /@unixroot/var/log/cron2.log.
|
|---|
| 85 |
|
|---|