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"
18 >=dev-java/sun-jre-bin-1.6
19 >=dev-java/sun-jdk-1.6
21 server? ( >=virtual/postgresql-server-8.3 )
22 logrotate? ( app-admin/logrotate )"
23 # not all packages available so use the included
24 # >=dev-java/jdbc-postgresql-8.3_p603
25 # >=dev-java/antlr-2.7.6
26 # >=dev-java/apple-java-extensions-bin-1.2
28 # >=dev-java/bcprov-1.36
29 # >=dev-java/jgoodies-binding-1.1.1
30 # =dev-java/cglib-2.1.3
31 # >=dev-java/commons-beanutils-1.7.0
32 # >=dev-java/commons-codec-1.3
33 # dev-java/commons-collections
34 # >=dev-java/commons-digester-1.7
35 # >=dev-java/commons-httpclient-3.1
36 # >=dev-java/commons-logging-1.0.4
37 # >=dev-java/dom4j-1.6.1
38 # >=dev-java/ehcache-1.2.3
39 # >=dev-java/hibernate-3.2.3
40 # >=dev-java/hibernate-annotations-3.2.1
41 # >=dev-java/itext-1.3.1
42 # >=app-text/jasperreports-1.3.3
43 # >=dev-java/javahelp-2.0.02
44 # >=dev-java/jcommon-1.0.2
45 # >=dev-java/jta-1.0.1
46 # >=dev-java/junit-3.8.1
47 # >=dev-java/log4j-1.2.12
48 # >=dev-java/sun-javamail-1.4
49 # >=dev-java/glassfish-persistence-1.0
51 # >=dev-java/swing-layout-1.0.2
52 # >=dev-java/swingx-0.9.3
53 # >=dev-java/xstream-1.2.2
54 # >=dev-java/c3p0-0.9.1
55 # >=dev-util/eclipse-sdk-3.1.0" # jdtcore
61 # user under which the winstrom server is running
62 enewuser winstrom
120 -1 /tmp nobody
66 # convert deb to tar.gz and unpack it
69 # change the postgres port
70 sed -i 's/5435/5432/' ${S}/etc
/winstrom
/winstrom-server.xml || die
72 # move winstrom jars into the temp dir, delete the rest and move it back
73 # cd ${S}/usr/share/${PN}/lib
75 # mv ./winstrom-* ./softeu-* ./tmp
79 # link all system libraries
80 # java-pkg_jar-from eclipse-ecj-3.1
93 #doins etc/${PN}/ws.cenServer.xml
94 doins etc
/${PN}/winstrom-server.xml
95 fowners winstrom
:root
/etc
/${PN}/winstrom-server.xml
96 fperms
600 /etc
/${PN}/winstrom-server.xml
99 newconfd
${FILESDIR}/${PN}-server.conf ${PN}-server
102 newinitd
${FILESDIR}/${PN}-server.init ${PN}-server
106 if use logrotate
; then
107 insinto
/etc
/logrotate.d
108 doins etc
/logrotate.d
/${PN}
112 insinto
/usr
/share
/${PN}
113 doins usr
/share
/${PN}/${PN}-logo-small.png
114 doins usr
/share
/${PN}/${PN}-splash.png
117 java-pkg_dojar usr
/share
/${PN}/lib
/*.jar
119 # launcher, server, client and VERSION
120 insinto
/usr
/share
/${PN}/lib
121 doins usr
/share
/${PN}/lib
/*.txt
125 FONT_S
=${S}/usr
/share
/fonts
/truetype
130 doicon usr
/share
/pixmaps
/${PN}.png
133 dodoc usr
/share
/doc
/${PN}/*
135 # create wrapper script for the server
136 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"
138 mv ${D}/usr/bin/${PN}-server ${D}/usr
/sbin || die
141 insinto
/usr
/share
/mimelnk
/application
/
142 doins usr
/share
/mimelnk
/application
/*
143 insinto
/usr
/share
/mime
/packages
/
144 doins usr
/share
/mime
/packages
/*
148 head -n6 etc
/default
/${PN} | tail -n2 > ${D}/etc/default/${PN}
150 # create wrapper script for the client
151 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
"
154 make_desktop_entry ${PN} "WinStrom
" ${PN}.png "Office
"
161 elog "To
make WinStrom working
, you have to start up the PostgreSQL server first.
"
162 elog "Then
, you have to create WinStrom DB admin
(with password
'7971'):"
163 elog "$ createuser
-a -d -P -E -U postgres
-W dba
"
165 elog "First you have to start up the WinStrom server by
/etc
/init.d
/winstrom-server.
"
166 elog "Then you can start up the application by
/usr
/bin
/winstrom.
"
169 elog "Fist
time you start the WinStrom application
, go into the Data
source management
"
170 elog "and Add new Data
source with Server address
127.0.0.1 and Server port
5434.
"