[Kde-java] Packaging an application
Richard Dale
kde-java@kde.org
Mon, 1 Apr 2002 16:43:38 +0100
--------------Boundary-00=_QOBWWHGT9VYUM4H4HZ2Y
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
On Sunday 31 March 2002 8:57 pm, George Russell wrote:
> How do I conviently package up a KDEJava application for end users?
> Any ideas?
kdoc is a perl application rather than C++, but it uses 'configure.in' and
'Makefile.in' to build and install, I adapted the same configure files to
install kalyptus bindings utility. The gilt install could put a shell script
with 'java <app path>/KSimpleBrowser' in the kde bin directory, which would
start the app in the apps/share directory.
eg /opt/kde3/bin/gilt.sh sets up a classpath including
/opt/kde3/apps/share/gilt/gilt.jar and calls 'java KSimpleBrowser'
I don't know how it works - a lot of the automake/autoconf stuff seems 'black
magic' to me. But I've attached the kalyptus Makefile.in and configure.in - I
think we need a standard install script like that for java apps, so that
people can just './configure ; make ; make install' as usual.
> Does anyone want to test my Etext reader?
> http://dogma.freebsd-uk.eu.org/~grrussel
Looks pretty neat! I'm still rebuilding my system after a gcc/gcj 3.1 test,
I'll try it out as soon as I can..
I like the line 'All below this line is obsolete' refering to the previous
Swing version. How do you think the code compares?
-- Richard
--------------Boundary-00=_QOBWWHGT9VYUM4H4HZ2Y
Content-Type: text/plain;
charset="iso-8859-1";
name="configure.in"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="configure.in"
AC_INIT(kalyptus)
AC_DEFUN(AC_FIND_PERL,
[
AC_MSG_CHECKING(for perl 5 or greater)
if $srcdir/findperl; then
$1=`cat perlbin`
echo $$1
else
echo "Couldn't find perl 5 or later. kdoc will not run."
exit 1
fi
])
AC_DEFUN(AC_KALYPTUS_VERSION,
[
AC_MSG_CHECKING(kalyptus version)
$1=`cat $srcdir/Version | sed 's#Revision##g' | tr -d '\$:'`
echo $$1
])
AC_PROG_INSTALL
AC_FIND_PERL(perl)
AC_SUBST(perl)
AC_KALYPTUS_VERSION(Version)
AC_SUBST(Version)
AC_OUTPUT(Makefile)
--------------Boundary-00=_QOBWWHGT9VYUM4H4HZ2Y
Content-Type: text/x-makefile;
charset="iso-8859-1";
name="Makefile.in"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="Makefile.in"
prefix = @prefix@
exec_prefix = @exec_prefix@
perl = @perl@
install = @INSTALL@
bin = kalyptus
pm = kdocUtil.pm kdocAstUtil.pm kdocParseDoc.pm kdocLib.pm \
Ast.pm kalyptusDataDict.pm kalyptusCxxToC.pm \
kalyptusCxxToObjc.pm kalyptusCxxToJava.pm kalyptusCxxToRuby.pm \
kalyptusCxxToPerl.pm kalyptusCxxToCSharp.pm \
Iter.pm
pmextra =
bindir = ${exec_prefix}/bin
pmdir = ${prefix}/share/kalyptus
srcdocdir= .
VERSION=@Version@
all: kalyptus.local
kalyptus.local: @srcdir@/kalyptus
cp @srcdir@/kalyptus kalyptus.local
perl -npi -e 's%^#\!.*$$%#!'${perl}' -I'${pmdir}'%g;' kalyptus.local
perl -npi -e 's#\$$Version\\\$$#'"${VERSION}"'#g;' kalyptus.local
install: all
${install} -d $(DESTDIR)${bindir}
${install} -m 755 kalyptus.local $(DESTDIR)${bindir}/kalyptus
${install} -d $(DESTDIR)${pmdir}
for file in ${pm} ${pmextra}; do \
${install} -m 644 @srcdir@/$$file $(DESTDIR)${pmdir}; \
done
uninstall:
(cd $(DESTDIR)${bindir} && rm -f ${bin})
(cd $(DESTDIR)${pmdir} && rm -f ${pm})
-rmdir $(DESTDIR)${bindir}
-rmdir $(DESTDIR)${pmdir}
clean:
rm -f kalyptus.local
distclean: clean
rm -f Makefile config.status config.log config.cache perlbin
srcdoc:
pod2html --flush --title KALYPTUS $(bin) $(pm) \
--outfile $(srcdocdir)/kalyptus-doc.html
tags:
perltags kalyptus *.pm
check:
@for dir in $(bin) $(pm); do \
echo "** Checking: $$dir"; \
perl -wc $$dir; done
--------------Boundary-00=_QOBWWHGT9VYUM4H4HZ2Y--