1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit eutils font java-pkg-2
7 DESCRIPTION
="Czech Economic System."
8 SRC_URI
="http://www.winstrom.cz/download/${PV%.*}/${P}.tar.gz"
9 HOMEPAGE
="http://www.winstrom.cz/"
13 IUSE
="logrotate server"
20 RDEPEND
="server? ( >=virtual/postgresql-server-8.3 )
21 logrotate? ( app-admin/logrotate )"
22 # not all packages available so use the included
23 # >=dev-java/jdbc-postgresql-8.3_p603
24 # >=dev-java/antlr-2.7.6
25 # >=dev-java/apple-java-extensions-bin-1.2
27 # >=dev-java/bcprov-1.36
28 # >=dev-java/jgoodies-binding-1.1.1
29 # =dev-java/cglib-2.1.3
30 # >=dev-java/commons-beanutils-1.7.0
31 # >=dev-java/commons-codec-1.3
32 # dev-java/commons-collections
33 # >=dev-java/commons-digester-1.7
34 # >=dev-java/commons-httpclient-3.1
35 # >=dev-java/commons-logging-1.0.4
36 # >=dev-java/dom4j-1.6.1
37 # >=dev-java/ehcache-1.2.3
38 # >=dev-java/hibernate-3.2.3
39 # >=dev-java/hibernate-annotations-3.2.1
40 # >=dev-java/itext-1.3.1
41 # >=app-text/jasperreports-1.3.3
42 # >=dev-java/javahelp-2.0.02
43 # >=dev-java/jcommon-1.0.2
44 # >=dev-java/jta-1.0.1
45 # >=dev-java/junit-3.8.1
46 # >=dev-java/log4j-1.2.12
47 # >=dev-java/sun-javamail-1.4
48 # >=dev-java/glassfish-persistence-1.0
50 # >=dev-java/swing-layout-1.0.2
51 # >=dev-java/swingx-0.9.3
52 # >=dev-java/xstream-1.2.2
53 # >=dev-java/c3p0-0.9.1
54 # >=dev-util/eclipse-sdk-3.1.0" # jdtcore
60 # user under which the winstrom server is running
61 enewuser winstrom
120 -1 /tmp nobody
65 # convert deb to tar.gz and unpack it
68 # change the postgres port
69 sed -i 's/5435/5432/' ${S}/etc
/winstrom
/winstrom-server.xml || die
71 # move winstrom jars into the temp dir, delete the rest and move it back
72 # cd ${S}/usr/share/${PN}/lib
74 # mv ./winstrom-* ./softeu-* ./tmp
78 # link all system libraries
79 # java-pkg_jar-from eclipse-ecj-3.1
92 doins etc
/${PN}/winstrom-server.xml
93 fowners winstrom
:root
/etc
/${PN}/winstrom-server.xml
94 fperms
600 /etc
/${PN}/winstrom-server.xml
97 newconfd
${FILESDIR}/${PN}-server.conf ${PN}-server
100 newinitd
${FILESDIR}/${PN}-server.init ${PN}-server
104 if use logrotate
; then
105 insinto
/etc
/logrotate.d
106 doins etc
/logrotate.d
/${PN}
110 insinto
/usr
/share
/${PN}
111 doins usr
/share
/${PN}/${PN}-logo-small.png
112 doins usr
/share
/${PN}/${PN}-splash.png
115 java-pkg_dojar usr
/share
/${PN}/lib
/*.jar
117 # launcher, server, client and VERSION
118 insinto
/usr
/share
/${PN}/lib
119 doins usr
/share
/${PN}/lib
/*.txt
123 FONT_S
=${S}/usr
/share
/fonts
/truetype
128 doicon usr
/share
/pixmaps
/${PN}.png
131 dodoc usr
/share
/doc
/${PN}/*
133 # create wrapper script for the server
134 java-pkg_dolauncher
${PN}-server --main cz.winstrom.net.server.WinStromServer
--pkg_args "-c /etc/winstrom/winstrom-server.xml --daemon" --java_args "-Xmx20m -client -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=10 -Djava.awt.headless=true -XX:CompileThreshold=16384"
136 mv ${D}/usr/bin/${PN}-server ${D}/usr
/sbin || die
139 insinto
/usr
/share
/mimelnk
/application
/
140 doins usr
/share
/mimelnk
/application
/*
141 insinto
/usr
/share
/mime
/packages
/
142 doins usr
/share
/mime
/packages
/*
146 head -n6 etc
/default
/${PN} | tail -n2 > ${D}/etc/default/${PN}
148 # create wrapper script for the client
149 java-pkg_dolauncher
${PN} --main org.codehaus.classworlds.Launcher --java_args "-splash:/usr/share/${PN}/${PN}.png -Xmx256m -client -Dwinstromdir=/usr/share/${PN}/lib -Dclassworlds.conf=/usr/share/${PN}/lib
/launcher.txt
"
152 make_desktop_entry ${PN} "WinStrom
" ${PN}.png "Office
"
159 elog "To
make WinStrom working
, you have to start up the PostgreSQL server first.
"
160 elog "Then
, you have to create WinStrom DB admin
(with password
'7971'):"
161 elog "$ createuser
-a -d -P -E -U postgres
-W dba
"
163 elog "Use the
/etc
/init.d
/winstrom-server
script to start up the WinStrom server.
"
166 elog "You can start up the WinStrom application by
/usr
/bin
/winstrom.
"
168 elog "Fist
time you start the WinStrom application
, go into the
'Data source management'"
169 elog "and
'Add' new
'Data source' with
'Server address' 127.0.0.1 and
'Server port' 5434.
"