OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Michael Schloh
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 09-May-2005 23:40:55
Branch: HEAD Handle: 2005050922405500
Modified files:
openpkg-src/ant ant.conf ant.spec rc.ant
Log:
integrate idea from Matthias KURZ to install docs, correct the
ANT_HOME path, and tag config files, also add %status section to run
command script
Summary:
Revision Changes Path
1.3 +1 -1 openpkg-src/ant/ant.conf
1.30 +16 -6 openpkg-src/ant/ant.spec
1.7 +10 -1 openpkg-src/ant/rc.ant
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/ant/ant.conf
============================================================================
$ cvs diff -u -r1.2 -r1.3 ant.conf
--- openpkg-src/ant/ant.conf 9 Jul 2003 14:39:00 -0000 1.2
+++ openpkg-src/ant/ant.conf 9 May 2005 21:40:55 -0000 1.3
@@ -2,6 +2,6 @@
## @l_prefix@/etc/ant/ant.conf -- Configuration file of Apache Ant build
tool
##
-ANT_HOME="@l_prefix@"
+ANT_HOME="@l_prefix@/libexec/ant"
export ANT_HOME
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/ant/ant.spec
============================================================================
$ cvs diff -u -r1.29 -r1.30 ant.spec
--- openpkg-src/ant/ant.spec 29 Apr 2005 06:36:17 -0000 1.29
+++ openpkg-src/ant/ant.spec 9 May 2005 21:40:55 -0000 1.30
@@ -37,7 +37,10 @@
Group: Development
License: Apache Software License
Version: %{V_opkg}
-Release: 20050429
+Release: 20050509
+
+# package options
+%option with_docs no
# list of sources
Source0:
http://www.apache.org/dist/ant/binaries/apache-ant-%{V_real}-bin.tar.bz2
@@ -54,7 +57,7 @@
%description
Apache Ant is a Java based build tool. In theory it is kind of like make
- without make's wrinkles.
+ without make's wrinkles. In practice it has its own wrinkles.
%track
prog ant = {
@@ -80,18 +83,25 @@
$RPM_BUILD_ROOT%{l_prefix}/bin \
$RPM_BUILD_ROOT%{l_prefix}/etc/ant \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
- $RPM_BUILD_ROOT%{l_prefix}/libexec/ant
+ $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib
%{l_shtool} install -c -m 755 \
-e 's;/etc/ant.conf;%{l_prefix}/etc/ant/ant.conf;' \
- -e 's;^\(ANT_LIB="\)[^"]*\("\);\1%{l_prefix}/libexec/ant\2;' \
+ -e 's;^\(ANT_LIB="\)[^"]*\("\);\1%{l_prefix}/libexec/ant/lib\2;' \
bin/ant $RPM_BUILD_ROOT%{l_prefix}/bin/
%{l_shtool} install -c -m 644 \
- lib/*.jar $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/
+ lib/*.jar $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/lib/
+%if "%{with_docs}" == "yes"
+ rm docs/LICENSE*
+ mv docs $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/
+ %{l_shtool} install -m 644 welcome.html \
+ $RPM_BUILD_ROOT%{l_prefix}/libexec/ant/docs/
+%endif
%{l_shtool} install -c -m 644 %{l_value -s -a} \
%{SOURCE ant.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/ant/
%{l_shtool} install -c -m 755 %{l_value -s -a} \
%{SOURCE rc.ant} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
+ %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
+ '%config %{l_prefix}/etc/ant/*.conf'
%files -f files
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/ant/rc.ant
============================================================================
$ cvs diff -u -r1.6 -r1.7 rc.ant
--- openpkg-src/ant/rc.ant 22 Jul 2003 08:10:37 -0000 1.6
+++ openpkg-src/ant/rc.ant 9 May 2005 21:40:55 -0000 1.7
@@ -5,7 +5,16 @@
%config
ant_enable="$openpkg_rc_def"
- ant_home="@l_prefix@"
+ ant_home=`. @l_prefix@/etc/ant/ant.conf; echo $ANT_HOME`
+
+%status -u root -o
+ ant_usable="unknown"
+ ant_active="no"
+ @l_prefix@/bin/ant -version >/dev/null 2>&1 &&
+ ant_usable="yes"
+ echo "ant_enable=\"$ant_enable\""
+ echo "ant_usable=\"$ant_usable\""
+ echo "ant_active=\"$ant_active\""
%env
rcService ant enable yes || exit 0
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]