|
|
@@ -37,18 +37,18 @@ Distribution: OpenPKG [EVAL]
|
|
|
Group: Misc
|
|
|
License: GPL
|
|
|
Version: %{V_vl}
|
|
|
-Release: 20020826
|
|
|
+Release: 20021211
|
|
|
|
|
|
# list of sources
|
|
|
Source0: ftp://ftp.heise.de/pub/ct/register/regpl%{V_vs}.zip
|
|
|
-Source1: ftp://ftp.heise.de/pub/ct/register/register.zip
|
|
|
+Source1: rc.heise
|
|
|
Source2: heise.conf
|
|
|
|
|
|
# build information
|
|
|
Prefix: %{l_prefix}
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
BuildPreReq: OpenPKG, openpkg >= 20020206, infozip
|
|
|
-PreReq: OpenPKG, openpkg >= 20020206, perl
|
|
|
+PreReq: OpenPKG, openpkg >= 20020206, infozip, perl, curl, shtool
|
|
|
AutoReq: no
|
|
|
AutoReqProv: no
|
|
|
|
|
|
@@ -57,28 +57,35 @@ AutoReqProv: no
|
|
|
|
|
|
%prep
|
|
|
%setup -T -c
|
|
|
- %update_config_scripts
|
|
|
%{l_prefix}/bin/unzip -x %{SOURCE regpl%{V_vs}.zip}
|
|
|
- %{l_prefix}/bin/unzip -x %{SOURCE register.zip}
|
|
|
|
|
|
%build
|
|
|
( echo "#!%{l_prefix}/bin/perl"
|
|
|
sed \
|
|
|
-e '1,15d' \
|
|
|
- -e "s;~/heise/inhalt.frm;%{l_prefix}/share/heise/inhalt.frm;" \
|
|
|
+ -e "s;~/heise/inhalt.frm;%{l_prefix}/var/heise/inhalt.frm;" \
|
|
|
-e "s;^\(\$frmfilefmt = \).*$;\1\"%{l_prefix}/etc/heise/heise.conf\"\;;" \
|
|
|
<reg.pl
|
|
|
-# -e "s;^\(\$frmfilefmt = \).*$;\1%{l_prefix}/etc/heise/heise.conf;" \
|
|
|
) >heise
|
|
|
|
|
|
%install
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
|
|
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/heise
|
|
|
- %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/share/heise
|
|
|
- %{l_shtool} install -c -m 755 heise $RPM_BUILD_ROOT%{l_prefix}/bin/
|
|
|
- %{l_shtool} install -c -m 644 INHALT.FRM $RPM_BUILD_ROOT%{l_prefix}/share/heise/inhalt.frm
|
|
|
- %{l_shtool} install -c -m 644 %{SOURCE heise.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/heise/
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
|
|
|
+ %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/heise
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ heise \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/bin/
|
|
|
+ %{l_shtool} install -c -m 644 \
|
|
|
+ %{SOURCE heise.conf} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/heise/
|
|
|
+ %{l_shtool} install -c -m 755 \
|
|
|
+ -e 's;@l_prefix@;%{l_prefix};g' \
|
|
|
+ -e 's;@l_musr@;%{l_musr};g' \
|
|
|
+ -e 's;@l_mgrp@;%{l_mgrp};g' \
|
|
|
+ %{SOURCE rc.heise} \
|
|
|
+ $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
|
|
|
%files -f files
|
|
|
@@ -86,3 +93,13 @@ AutoReqProv: no
|
|
|
%clean
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
+%post
|
|
|
+ if [ "$1" -eq 1 ]; then
|
|
|
+ $RPM_INSTALL_PREFIX/etc/rc.d/rc.heise weekly || true
|
|
|
+ fi
|
|
|
+
|
|
|
+%preun
|
|
|
+ if [ "$1" -eq 0 ]; then
|
|
|
+ rm -rf $RPM_INSTALL_PREFIX/var/heise/* 2>/dev/null || true
|
|
|
+ fi
|
|
|
+
|