diff options
author | Stuart Shelton <stuart@shelton.me> | 2016-04-29 17:07:06 +0100 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2016-04-29 17:07:06 +0100 |
commit | dfb0d9f436799009601afb204372b16281c0fc6b (patch) | |
tree | 49c7e856bbef15f522cdf11033092cbceb1588df | |
parent | Update sys-devel/gcc-5.3.0 (diff) | |
download | srcshelton-dfb0d9f436799009601afb204372b16281c0fc6b.tar.gz srcshelton-dfb0d9f436799009601afb204372b16281c0fc6b.tar.bz2 srcshelton-dfb0d9f436799009601afb204372b16281c0fc6b.zip |
Add www-apps/nabaztaglives-2.1.2
-rw-r--r-- | www-apps/nabaztaglives/Manifest | 4 | ||||
-rw-r--r-- | www-apps/nabaztaglives/files/nabaztaglives-2.1-lang-ja.patch | 24 | ||||
-rw-r--r-- | www-apps/nabaztaglives/files/nabaztaglives-2.1.2-api.patch | 292 | ||||
-rw-r--r-- | www-apps/nabaztaglives/nabaztaglives-2.1.2.ebuild | 138 |
4 files changed, 458 insertions, 0 deletions
diff --git a/www-apps/nabaztaglives/Manifest b/www-apps/nabaztaglives/Manifest index 987b4603..8832a312 100644 --- a/www-apps/nabaztaglives/Manifest +++ b/www-apps/nabaztaglives/Manifest @@ -1,10 +1,14 @@ AUX nabaztaglives-2.00-api.patch 9297 SHA256 e685d2b9cdfc75f2ee243ccefa9183defe375202a61b06986dae5cc6c62154f4 SHA512 5405c6a3902afb62a2f3f7ee19674d37187eaf8aecaafdd27373d1e35fe9b3171ac7f84e9fe3bfb3454f2440c80bce77d359134f74db5c6a52e65be6959bf42b WHIRLPOOL 4236b2acd015996da7786a981588732c4f79062384b786f0dc0ebbdbe14ad1ad02cb79a5cfe389b5b732d479a21dab2eab3ed6cb82b1ec8ea1ec00834c3f690b AUX nabaztaglives-2.00.patch 20490 SHA256 687d25d6dbf30f52ee06c646fbbbe576b36a129c4d5708a9c5b41fc138feaf31 SHA512 22ba32963081fb3ed5dc0ab30eddc0714834d7dd010a920d96d6c33f763491dbcb0c772b4e0c317ca4054990389fbb50cba7d38f513d3ffc17e008c3897f2899 WHIRLPOOL 67360162ba38a4323b9d20327452ab96ea14783529c10f762e226fa9f468fd77e84bee27c337e254924d28b93a862ff5a43157939d14810932a0712ef9d243ac AUX nabaztaglives-2.01-api.patch 9011 SHA256 a6f677f7819018fb57251b1249874c43654097faf2ba5c4b717e29eb84bce2e9 SHA512 b438464343331201ede935b83b6fb4c6d646195fbcbbfefcbb41f912a6db1c0af2a31e0698160db3a13e33cb0ca85ffc4d154c595369735df83ec22e7257cbdc WHIRLPOOL 033d86f9badd68fb557f0aa2070162878bd7007b5d8df774698cc5adbeab6d3488ed5264de58f0652baafd65ae654d594892efcdea1841f4b4573da52354adf9 +AUX nabaztaglives-2.1-lang-ja.patch 559 SHA256 4379e6ce878d0d700ef7727006e5af6f2d915e1ade4109d71e6b25e167dfff81 SHA512 1c38674dfd9b09b1f6f2af9f5a8958ccdff2c6ccbec02e9ecd36505299c3587428ae11a3fb6664212595e03c2df86577ca123f241f570c3bfab3404dd366b354 WHIRLPOOL 60c07415dcb2c4cb6be5bc9b5aa02497387e495a9e5717a050d1805a024ab3c77e47e20470212886250903116e68ca3c58fb341334e6271e8202966c3fec6c76 +AUX nabaztaglives-2.1.2-api.patch 9012 SHA256 b34e882c503244d5d55f14f66947183acd6abf446663465845b70d15ad32e0e1 SHA512 1e7bdf4bb661c7a8051c7d447d507969abf31770e004f7dde4330dd113cb116e77c9911514b13b76c25b8e36d1ba4485b70b2a61768baf6b9556dad5381a1c6d WHIRLPOOL 663a361a42bb7412aa923a6d66299f3452501bd72096e338f1722facce0446769ce3d1ca8e863e1a3d064ab0633b568e36b400d8e462188e26e41dba9e7f4b90 AUX postinstall-en-2.00.txt 300 SHA256 c54ee8192d3aed8a0f90dc5f9805e42e237e1d479ef3bce2679e6d3dff383af5 SHA512 ac3e056e697f6f29a2cb88e0d34aab33c4968c98f08099f71dc80700004883eab6f89dbf7dc168ea18bfcd89b8108b2474af591a40800f6cc5ad20783d713da2 WHIRLPOOL 828a8d8f4aae4ad2fcc9e13148ce73d0f163b35ec5363e090358957fbb1a9da2e53c87164b6aca55bb186905b8407f227804cf37040f764dbbc6aa94da3dca52 +DIST nabaztaglives-code-258dd0c4c32207863fb4657a453d507876ca2c5a.zip 32143186 SHA256 f299562289bade6779539f929413cec8f30205cd4a133f4bfd964a6cadb938fb SHA512 5ae0d1fdb6b82eb9a0c22b7a9986ddf4e28cab9571f0ba652d52de499e4003a2eba7220d0e91f3d9fc009a8809ea4257eb12d5d66fc3fab1b6edced67a28d032 WHIRLPOOL 50daf7acac1444f7960830bdf348b8a64cb6efd124882332bfaae42d4f45c515351dc3d303283bd32f10aad9d0eb19013df4c6962571c636df2ee8618c34285c DIST nabaztaglives-code-5577e0e24dcf95179d078ddc04753a83b1e43b0a.zip 31649978 SHA256 72ae80194e5522fce4732302d41a580262947fdc55dcc52bcfa2d7f5b6de10a8 SHA512 9b3ba8bb8af32a48529af796fca25a70cb607413a32a877e33a157829dcb5540f8b9e47de4d8725f6bd4ad6af9661503aef8d45661cfe7b675d72999ce269f8b WHIRLPOOL 195c3de2dc7c55ea005bc03f5b66a1d258b69dbccb3911e27c3487128588e998e55d5dadfaac72fd8e0b2911c518aa23a65ffd387000b0c359a5706d12eb15f6 DIST nabaztaglives-code-74cd772d67aaad1accbb58382e16cfaaa5ac6d87.zip 31650624 SHA256 08284563d747154b61036cd4a4172a4b3999ffffa6413b7a4e73628b70c3e07d SHA512 227a3544b3df4394da3d748355756fb4f27bdb140b80840e1b1ffd93da1c2d8d5e57ffaf50d7970a340fc2000377c90f8d207efffcc848319f09792621f66efc WHIRLPOOL e24b423b06b0dc302e596031714a5c210c1783898235664753a8272c8bcd3c8ee209927a7bb690627c56dcb353e4abd9387910573f552de99d607887cbc2c5b0 DIST nabaztaglives-code-d3a30896c132760bef5f6823efa3b3bb8d0c9f3d.zip 31565931 SHA256 79d3b34adbf2cbb02959fd9d224a99e6d975ec1d60cecd297b9db9e62954fb20 SHA512 951fa50d8efabd0e981b0a03d42d1de9d69d3fc117795fdb8f5d092abbd26c778d21c296fcb2980efeba46894df433a0e711731ab0519fb9a18f4116e3767423 WHIRLPOOL 0f5580c67e925b82e8e2e65e888eb0fede7f293f6eab6004305995fbfbeb9eaa9bb9f22d327c51df0b2afbd26aaf69462fae6f618488b6a692eceec2e9116aa9 EBUILD nabaztaglives-2.00.ebuild 3149 SHA256 ac9e3803d30d2823ff50ee2667ba68408abe320c8b0f89e877e156783d89ba67 SHA512 98092111317cd4db0b401d5254a0a5f125e367e09cf297f6ec3b64413b35be34cdb40b218bc10a57ca2681521758e0d7a2f31db13be9a1cfc44311c68cf8ec20 WHIRLPOOL 9a5f5f21808493a96c92a3e9484c2e48e0f397ca2bbaac3f1c5499414b664833c9956c2b6349e19bde98ac801eefaf4564508c523916b8249a6cae5aa6cae4d2 EBUILD nabaztaglives-2.01.ebuild 3148 SHA256 120e1215a875358fbfffca4473176d7fcf90f31070b7a71f018f5f61c0cb489c SHA512 21a0f15b016f4c0b28297b36b01b87175635b1e6bd6e475ab0d489067b9d554e15602441a462e53d3db0209d5ce9caea71d5cc43fcf76c2cd76d60dc94e157ac WHIRLPOOL 6a5f5bd9c562d62ffaa847026c1a3bface2a2255d11debf283172fbe92d5fab72ca54d1438eb281f7d21ee0e8751aa3789909157b6d2f3ffdeb7157d860577ff EBUILD nabaztaglives-2.03.ebuild 3161 SHA256 e98b76cd10de54ab99b8c473ae1a4b64db70db635b198a18c9f0ec1b7986b292 SHA512 e2cd2f6dfc999eb961392acbe66bffdbd0f57345004c33e00e143a34c7cb7dc9957a3f67d255157c1e2df39d35e64c6d05bcf25eccafa57868075a5b2911b5e8 WHIRLPOOL 4c3a95ed33747af8a37dae7f493c05bccc5caeb9669d4117c21e5e296476dec74b0452630a1037bca05fa40b3d154710bce2123a64826ceefb328f417bd24c2b +EBUILD nabaztaglives-2.1.2.ebuild 3669 SHA256 d7929606ef5131da94d130d42703a7b41286b9c43fc040ee5028787f83053e40 SHA512 a007c61458c20a93fb35f45723459945322173edb6c48ff536504fcbfe6e3e02fc639978368c02fe1a0e35c30f080ecfe259500b4c04e53e3a938c554b9572b0 WHIRLPOOL 65811264cc866e18a4fa5c9df7d96ebb133e4fde242a298f6c3c11f183853b4556f89c1a058484ea3fea48af02fdc61dc2ed7d5b496b4b83ae3405c5cf7b391b diff --git a/www-apps/nabaztaglives/files/nabaztaglives-2.1-lang-ja.patch b/www-apps/nabaztaglives/files/nabaztaglives-2.1-lang-ja.patch new file mode 100644 index 00000000..f5cea338 --- /dev/null +++ b/www-apps/nabaztaglives/files/nabaztaglives-2.1-lang-ja.patch @@ -0,0 +1,24 @@ +--- a/db/rabbit_pi.sql ++++ b/db/rabbit_pi.sql +@@ -163,6 +163,13 @@ + (name + ,description + ) ++select 'ja' ++ ,'japanese-ja'; ++ ++insert into language ++(name ++,description ++) + select 'uk' + ,'english-uk'; + +@@ -217,6 +224,7 @@ + insert into timeZone (name) values('Pacific/Honolulu'); + insert into timeZone (name) values('Pacific/Auckland'); + insert into timeZone (name) values('Atlantic/Bermuda'); ++insert into timeZone (name) values('Asia/Tokyo'); + insert into timeZone (name) values('Asia/Dubai'); + insert into timeZone (name) values('Europe/Kiev'); + diff --git a/www-apps/nabaztaglives/files/nabaztaglives-2.1.2-api.patch b/www-apps/nabaztaglives/files/nabaztaglives-2.1.2-api.patch new file mode 100644 index 00000000..44450189 --- /dev/null +++ b/www-apps/nabaztaglives/files/nabaztaglives-2.1.2-api.patch @@ -0,0 +1,292 @@ +--- www/api.php.dist 2015-05-03 16:51:41.252860991 +0100 ++++ www/api.php 2015-05-03 16:55:27.236896977 +0100 +@@ -29,7 +29,9 @@ You should have received a copy of the G + along with NabaztagLives. If not, see <http://www.gnu.org/licenses/>. + */ + //error_reporting(E_ALL); //don't use this in production +-ini_set('display_errors', 0); ++//ini_set('display_errors', 0); ++error_reporting(E_ALL); //don't use this in production ++ini_set('display_errors', 1); + ini_set('log_errors', 1); + ini_set('error_log','logs/error.log'); + //error_reporting(0); //don't use this, use ini_set or nothing goes to the log +@@ -59,7 +61,8 @@ if(isset($_GET['stream'])) $stream=$_GET + if(isset($_GET['earleft'])) $earleft= $_GET['earleft']; + if(isset($_GET['earright'])) $earright= $_GET['earright']; + +-$debug=false; ++//$debug=false; ++$debug=true; + + if(strlen($sn) == 0) + { +@@ -106,7 +109,7 @@ include 'config/db.php'; + $con = mysqli_connect($host,$user,$pass,$db); + if (!$con) + { +- logError('Api.php: Could not connect: ' . mysqli_connect_errno() . mysqli_connect_error()); ++ logError('api.php: Could not connect: ' . mysqli_connect_errno() . mysqli_connect_error()); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -126,7 +129,7 @@ if($debug) echo $cmd . '<p>'; + $result = mysqli_query($con,$cmd); + if (!$result) + { +- logError('Api.php: Invalid log connect call. ' . mysqli_error($con)); ++ logError('api.php: Invalid log connect call. ' . mysqli_error($con)); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -134,7 +137,7 @@ if (!$result) + $result = mysqli_query($con,"select @rabbitID"); + if (!$result) + { +- logError('Api.php: Invalid log query. ' . mysqli_error($con)); ++ logError('api.php: Invalid log query. ' . mysqli_error($con)); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -150,7 +153,8 @@ if($rabbitID < 1) //rows found in DB + return; + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + /************************************* + * get rabbit +@@ -160,7 +164,7 @@ if($debug) echo $cmd . '<p>'; + $result = mysqli_query($con,$cmd); + if (!$result) + { +- logError('Api.php: Invalid getRabbit query. ' . mysqli_error($con)); ++ logError('api.php: Invalid getRabbit query. ' . mysqli_error($con)); + echo 'The operation failed. The head rabbit has been placed on notice.'; + return; + } +@@ -189,7 +193,8 @@ while($row = mysqli_fetch_row($result)) + + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + $min = date("i"); //minute 00-59 + $sec = date("s"); //secs 00-59 +@@ -209,10 +214,11 @@ $cmd = "delete from queue " + $result = mysqli_query($con,$cmd); + if (!$result) + { +- logError('Api.php: Invalid delete queue query: ' . mysqli_error($con)); ++ logError('api.php: Invalid delete queue query: ' . mysqli_error($con)); + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + //need to check here to make sure there is not already a msg in the queue from multiple attempts + +@@ -240,7 +246,8 @@ if($count > 0) + exit(0); + } + +-mysqli_next_result($con); //required to avoid sync error ++//mysqli_next_result($con); //required to avoid sync error ++while(mysqli_next_result($con)); + + /************************************************************** + * LED color +@@ -471,25 +478,26 @@ return; + function queueV1($msg,$rabbitID,$min,$con) + { + if(strlen($msg) < 1) return; +- +- mysqli_next_result($con); //required to avoid sync error +- +- $cmd = "call sp_Queue2('" . $rabbitID . "' +- ,'" . $min . "' +- ,'" . $msg . "' +- ,@msg +- )"; ++ ++ logError("DEBUG: api.php:queueV1 started with msg '" . $msg . "'"); ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); ++ ++ $cmd = "call sp_Queue2('" . $rabbitID . "', '" . $min . "', '" . $msg . "', @msg)"; + +- $result = queryWithRetry($con,$cmd,$rabbitID,"api.php queue function."); +- ++ $result = queryWithRetry($con,$cmd,$rabbitID,"api.php queue function."); ++ + if (!$result) + { +- logError("Api.php: Queue query failed. " . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ logError("api.php: Queue query failed: " . mysqli_error($con)); ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } +- +- mysqli_next_result($con); //required to avoid sync error ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -497,10 +505,10 @@ function queueV1($msg,$rabbitID,$min,$co + $msg = $row[0]; + + if($msg != 'OK') +- logError("Api.php: Queue function: $msg"); +- +- mysqli_next_result($con); //required to avoid sync error +- ++ logError("api.php: Queue function: $msg"); ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + /***************************************************************** +@@ -534,11 +542,13 @@ function queueCmd($serNbr,$min,$msg,$con + if (!$result) + { + logError('API.php: Queue function invalid insert after retry: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -552,7 +562,8 @@ function queueCmd($serNbr,$min,$msg,$con + logError($msg); + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + } + +@@ -566,41 +577,41 @@ function queue($serNbr,$min,$tts,$con,$l + echo "You need to enter some text to send to the rabbit. $back"; + return; + } +- ++ ++ logError("DEBUG: api.php:queue started for serial '" . $serNbr . "', text '" . $tts . "'"); ++ + $tts = mysqli_real_escape_string($con, $tts); + + $lang = getLanguage($lang); +- ++ + doTTS2($tts,$lang,$serNbr); +- ++ + $hutch = "./hutch/$serNbr"; +- $msg="PLAY $hutch/rss.mp3"; ++ $msg="PLAY $hutch/rss.mp3"; + +- $cmd = "call sp_Queue('" . $serNbr . "' +- ,'" . $min . "' +- ,'" . $msg . "' +- ,@msg +- )"; ++ $cmd = "call sp_Queue('" . $serNbr . "', '" . $min . "', '" . $msg . "', @msg)"; + + $result = mysqli_query($con,$cmd); +- ++ + //retry transaction +- if(!$result) ++ if (!$result) + { +- usleep(1000000); //1 sec +- //usleep(100000); //100 ms +- +- $result = mysqli_query($con,$cmd); ++ usleep(1000000); //1 sec ++ //usleep(100000); //100 ms ++ ++ $result = mysqli_query($con,$cmd); + } +- ++ + if (!$result) + { +- logError('API.php Queue function invalid insert after retry: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ logError('api.php Queue function invalid insert after retry: ' . mysqli_error($con)); ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } +- +- mysqli_next_result($con); //required to avoid sync error ++ ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -613,9 +624,9 @@ function queue($serNbr,$min,$tts,$con,$l + { + logError($msg); + } +- +- mysqli_next_result($con); //required to avoid sync error + ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + /*********************************************************** +@@ -634,11 +645,13 @@ function outV1($out,$rabbitID,$min,$con) + if (!$result) + { + logError('Out function invalid update last Command query: ' . mysqli_error($con)); +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + return; + } + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + + $result = mysqli_query($con,"select @msg"); + +@@ -648,7 +661,8 @@ function outV1($out,$rabbitID,$min,$con) + if($msg != 'OK') + logError($msg); + +- mysqli_next_result($con); //required to avoid sync error ++ //mysqli_next_result($con); //required to avoid sync error ++ while(mysqli_next_result($con)); + } + + +@@ -674,4 +688,4 @@ function doTTS($t,$lang,$sn) + } + + ?> +-</html> +\ No newline at end of file ++</html> diff --git a/www-apps/nabaztaglives/nabaztaglives-2.1.2.ebuild b/www-apps/nabaztaglives/nabaztaglives-2.1.2.ebuild new file mode 100644 index 00000000..b940b025 --- /dev/null +++ b/www-apps/nabaztaglives/nabaztaglives-2.1.2.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=5 + +inherit eutils webapp + +LANGUAGES="linguas_de linguas_en linguas_es linguas_fr linguas_it linguas_ja linguas_us" + +COMMIT="258dd0c4c32207863fb4657a453d507876ca2c5a" + +DESCRIPTION="Nabaztag/tag NabaztagLives! Server" +HOMEPAGE="http://nabaztaglives.com" +SRC_URI="http://sourceforge.net/code-snapshots/git/n/na/nabaztaglives/code.git/nabaztaglives-code-${COMMIT}.zip" +RESTRICT="nomirror" + +LICENSE="GPL-3" +KEYWORDS="~amd64 ~x86" +IUSE="doc ${LANGUAGES}" + +RDEPEND=" + virtual/httpd-php + dev-lang/php + media-sound/lame + media-sound/mp3wrap +" + +need_httpd_cgi + +S="${WORKDIR}/nabaztaglives-code-${COMMIT}" + +pkg_setup() { + einfo "If the source for this ebuild fails to download, please access the following URL:" + einfo + einfo " https://sourceforge.net/p/nabaztaglives/code/ci/258dd0c4c32207863fb4657a453d507876ca2c5a/tree/" + einfo + einfo "... and select 'Download Snapshot' in order to regenerate the cached archive." + einfo + einfo "This is (one of the many reasons) why everyone is using github instead..." + + webapp_pkg_setup +} + +src_prepare() { + cd "${S}" + + if use linguas_ja; then + epatch "${FILESDIR}"/"${PN}"-2.1-lang-ja.patch + fi + + sed -si \ + -e 's|<? |<?php |g' \ + www/*.php \ + || die "PHP patching failed: ${?}" + + sed -si \ + -e "s|'../etc/nabaztag_error.log'|'logs/error.log'|" \ + www/*.php www/subroutines/logError.php \ + || die "Log-location patching failed: ${?}" + sed -si \ + -e 's|../etc/nabaztag_error.log|logs/error.log|' \ + www/vl/p4.php www/vl/FR/p3.jsp \ + || die "Log-location patching failed: ${?}" + + sed -si \ + -e "s|../etc/api_calls.log|logs/apicalls.log|" \ + www/*.php \ + || die "API log-location patching failed: ${?}" + + sed -si \ + -e 's|../etc/nabaztag_db.php|config/db.php|' \ + www/*.php www/subroutines/*.php www/vl/p4.php www/vl/FR/p3.jsp \ + || die "Configuration patching failed: ${?}" + + sed -rsi \ + -e 's|<img src="?([^"> ]+).jpg"?|<img src="images/\1.jpg"|g' \ + www/*.php www/*.htm \ + || die "Image patching failed: ${?}" + sed -rsi \ + -e 's|<a href="?([^"> ]+).jpg"?|<a href="images/\1.jpg"|g' \ + www/*.php \ + || die "Image patching failed: ${?}" + + sed -rsi \ + -e 's|url\(([^)]+).jpg\)|url(images/\1.jpg)|g' \ + www/main.css \ + || die "CSS Image patching failed: ${?}" + + sed -si \ + -e "/'pi'/d" \ + db/rabbit_pi.sql \ + || die "MySQL script patching failed: ${?}" + + #use linguas_en || { einfo "Removing audio files for EN/US language" ; rm -r www/vl/broad_us ; } + for LNG in it es de us; do + eval "use linguas_${LNG} || { einfo 'Removing audio files for ${LNG} language' ; rm -r www/vl/broad_${LNG} ; }" + done + + mkdir www/images + + rm db/*.sh + rm docs/installation.htm + + mv www/*.jpg www/images/ + mv db/rabbit_pi.sql db/initial.sql + + epatch "${FILESDIR}/${P}-api.patch" || die "Patch failed" + epatch "${FILESDIR}/${PN}-2.00.patch" || die "Patch failed" +} + +src_install() { + webapp_src_preinst + + use doc && dohtml -r docs/* + + ewarn "Installation of large numbers of files can be slow - please wait ..." + insinto "${MY_HTDOCSDIR}" + doins -r www/* + dodir "${MY_HTDOCSDIR}"/db + dodir "${MY_HTDOCSDIR}"/config + dodir "${MY_HTDOCSDIR}"/logs + insinto "${MY_HTDOCSDIR}"/db + doins -r db/* + insinto "${MY_HTDOCSDIR}"/config + newins etc/nabaztag_db.php db.php + insinto "${MY_HTDOCSDIR}"/logs + newins etc/nabaztag_error.log error.log + + webapp_serverowned "${MY_HTDOCSDIR}"/vl/hutch + webapp_serverowned "${MY_HTDOCSDIR}"/logs/error.log + webapp_configfile "${MY_HTDOCSDIR}"/config/db.php + webapp_configfile "${MY_HTDOCSDIR}"/locate.jsp + + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-2.00.txt + + webapp_src_install +} |