mediabox rev 5

Add po files and Makefile
author Christophe Lincoln <pankso@slitaz.org>
date Thu Feb 23 21:48:05 2017 +0100 (2017-02-23)
parents f84b344d56ec
children 7572f9f6a649
files Makefile po/fr.po po/mediabox.pot server.sh
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/Makefile	Thu Feb 23 21:48:05 2017 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +# Makefile for CGI/SHell Media Box
     1.5 +#
     1.6 +
     1.7 +PACKAGE="mediabox"
     1.8 +DESTDIR?=
     1.9 +PREFIX?=/usr
    1.10 +CGI_BIN?=/var/www/cgi-bin
    1.11 +LINGUAS?=fr
    1.12 +
    1.13 +all: msgfmt
    1.14 +
    1.15 +pot:
    1.16 +	xgettext -o po/mediabox.pot -L Shell --package-name="MediaBox" \
    1.17 +		./index.cgi ./mediabox
    1.18 +
    1.19 +msgmerge:
    1.20 +	@for l in $(LINGUAS); do \
    1.21 +		echo -n "Updating $$l po file."; \
    1.22 +		msgmerge -U po/$$l.po po/$(PACKAGE).pot; \
    1.23 +	done;
    1.24 +
    1.25 +msgfmt:
    1.26 +	@for l in $(LINGUAS); do \
    1.27 +		echo "Compiling $$l mo file..."; \
    1.28 +		mkdir -p po/mo/$$l/LC_MESSAGES; \
    1.29 +		msgfmt -o po/mo/$$l/LC_MESSAGES/$(PACKAGE).mo po/$$l.po; \
    1.30 +	done;
    1.31 +
    1.32 +install:
    1.33 +	install -m 0755 -d $(DESTDIR)$(PREFIX)/bin
    1.34 +	install -m 0755 -d $(DESTDIR)$(PREFIX)/share/applications
    1.35 +	install -m 0755 mediabox $(DESTDIR)$(PREFIX)/bin
    1.36 +	install -m 0644 data/mediabox.desktop $(DESTDIR)$(PREFIX)/share/applications
    1.37 +	# Web interface
    1.38 +	install -m 0755 -d $(DESTDIR)$(CGI_BIN)/mediabox
    1.39 +	install -m 0777 -d $(DESTDIR)$(CGI_BIN)/mediabox/cache
    1.40 +	install -m 0755 index.cgi $(DESTDIR)$(CGI_BIN)/mediabox
    1.41 +	cp -r images/ $(DESTDIR)$(CGI_BIN)/mediabox
    1.42 +	cp -r lib/ $(DESTDIR)$(CGI_BIN)/mediabox
    1.43 +	cp README $(DESTDIR)$(CGI_BIN)/mediabox
    1.44 +	# i18n
    1.45 +	install -m 0777 -d $(DESTDIR)$(PREFIX)/share/locale
    1.46 +	cp -a po/mo/* $(DESTDIR)$(PREFIX)/share/locale
    1.47 +	
    1.48 +uninstall:
    1.49 +	rm -f $(DESTDIR)$(PREFIX)/bin/mediabox
    1.50 +	rm -rf $(DESTDIR)$(CGI_BIN)/mediabox
    1.51 +	rm -f $(DESTDIR)$(PREFIX)/share/locale/*/mediabox.mo
    1.52 +
    1.53 +clean:
    1.54 +	rm -rf po/*~
    1.55 +	rm -rf po/mo
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/po/fr.po	Thu Feb 23 21:48:05 2017 +0100
     2.3 @@ -0,0 +1,85 @@
     2.4 +# SOME DESCRIPTIVE TITLE.
     2.5 +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
     2.6 +# This file is distributed under the same license as the PACKAGE package.
     2.7 +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
     2.8 +#
     2.9 +msgid ""
    2.10 +msgstr ""
    2.11 +"Project-Id-Version: MediaBox\n"
    2.12 +"Report-Msgid-Bugs-To: \n"
    2.13 +"POT-Creation-Date: 2017-02-23 21:26+0100\n"
    2.14 +"PO-Revision-Date: 2017-02-13 02:14+0100\n"
    2.15 +"Last-Translator: Christophe Lincoln <pankso@slitaz.org>\n"
    2.16 +"Language-Team: \n"
    2.17 +"Language: fr\n"
    2.18 +"MIME-Version: 1.0\n"
    2.19 +"Content-Type: text/plain; charset=UTF-8\n"
    2.20 +"Content-Transfer-Encoding: 8bit\n"
    2.21 +"X-Generator: Poedit 1.8.6\n"
    2.22 +"Plural-Forms: nplurals=2; plural=(n > 1);\n"
    2.23 +
    2.24 +#: index.cgi:29
    2.25 +msgid "Missing config file:"
    2.26 +msgstr ""
    2.27 +
    2.28 +#: index.cgi:64
    2.29 +msgid "Home"
    2.30 +msgstr "Accueil"
    2.31 +
    2.32 +#: index.cgi:65 index.cgi:80 index.cgi:239
    2.33 +msgid "Music"
    2.34 +msgstr "Musique"
    2.35 +
    2.36 +#: index.cgi:66 index.cgi:81 index.cgi:246
    2.37 +msgid "Videos"
    2.38 +msgstr "Vidéos"
    2.39 +
    2.40 +#: index.cgi:67 index.cgi:82 index.cgi:253
    2.41 +msgid "Playlists"
    2.42 +msgstr "Playlists"
    2.43 +
    2.44 +#: index.cgi:68 index.cgi:83 index.cgi:260
    2.45 +msgid "Radio"
    2.46 +msgstr ""
    2.47 +
    2.48 +#: index.cgi:84 index.cgi:267
    2.49 +msgid "Settings"
    2.50 +msgstr "Réglages"
    2.51 +
    2.52 +#: index.cgi:119
    2.53 +#, fuzzy
    2.54 +msgid "Videos found"
    2.55 +msgstr "Vidéos"
    2.56 +
    2.57 +#: index.cgi:170 index.cgi:190
    2.58 +msgid "No track playing"
    2.59 +msgstr ""
    2.60 +
    2.61 +#: index.cgi:216
    2.62 +msgid "No video playing"
    2.63 +msgstr ""
    2.64 +
    2.65 +#: mediabox:19
    2.66 +msgid "MediaBox cmdline tool"
    2.67 +msgstr ""
    2.68 +
    2.69 +#: mediabox:21
    2.70 +msgid "Usage:"
    2.71 +msgstr "Utilisation:"
    2.72 +
    2.73 +#: mediabox:22
    2.74 +msgid "Commands:"
    2.75 +msgstr ""
    2.76 +
    2.77 +#: mediabox:25
    2.78 +msgid "Examples:"
    2.79 +msgstr ""
    2.80 +
    2.81 +#: mediabox:61
    2.82 +msgid "Adding playlist:"
    2.83 +msgstr ""
    2.84 +
    2.85 +#: mediabox:62
    2.86 +#, fuzzy
    2.87 +msgid "Playlist tracks:"
    2.88 +msgstr "Playlists"
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/po/mediabox.pot	Thu Feb 23 21:48:05 2017 +0100
     3.3 @@ -0,0 +1,82 @@
     3.4 +# SOME DESCRIPTIVE TITLE.
     3.5 +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
     3.6 +# This file is distributed under the same license as the PACKAGE package.
     3.7 +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
     3.8 +#
     3.9 +#, fuzzy
    3.10 +msgid ""
    3.11 +msgstr ""
    3.12 +"Project-Id-Version: MediaBox\n"
    3.13 +"Report-Msgid-Bugs-To: \n"
    3.14 +"POT-Creation-Date: 2017-02-23 21:26+0100\n"
    3.15 +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    3.16 +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    3.17 +"Language-Team: LANGUAGE <LL@li.org>\n"
    3.18 +"Language: \n"
    3.19 +"MIME-Version: 1.0\n"
    3.20 +"Content-Type: text/plain; charset=CHARSET\n"
    3.21 +"Content-Transfer-Encoding: 8bit\n"
    3.22 +
    3.23 +#: index.cgi:29
    3.24 +msgid "Missing config file:"
    3.25 +msgstr ""
    3.26 +
    3.27 +#: index.cgi:64
    3.28 +msgid "Home"
    3.29 +msgstr ""
    3.30 +
    3.31 +#: index.cgi:65 index.cgi:80 index.cgi:239
    3.32 +msgid "Music"
    3.33 +msgstr ""
    3.34 +
    3.35 +#: index.cgi:66 index.cgi:81 index.cgi:246
    3.36 +msgid "Videos"
    3.37 +msgstr ""
    3.38 +
    3.39 +#: index.cgi:67 index.cgi:82 index.cgi:253
    3.40 +msgid "Playlists"
    3.41 +msgstr ""
    3.42 +
    3.43 +#: index.cgi:68 index.cgi:83 index.cgi:260
    3.44 +msgid "Radio"
    3.45 +msgstr ""
    3.46 +
    3.47 +#: index.cgi:84 index.cgi:267
    3.48 +msgid "Settings"
    3.49 +msgstr ""
    3.50 +
    3.51 +#: index.cgi:119
    3.52 +msgid "Videos found"
    3.53 +msgstr ""
    3.54 +
    3.55 +#: index.cgi:170 index.cgi:190
    3.56 +msgid "No track playing"
    3.57 +msgstr ""
    3.58 +
    3.59 +#: index.cgi:216
    3.60 +msgid "No video playing"
    3.61 +msgstr ""
    3.62 +
    3.63 +#: mediabox:19
    3.64 +msgid "MediaBox cmdline tool"
    3.65 +msgstr ""
    3.66 +
    3.67 +#: mediabox:21
    3.68 +msgid "Usage:"
    3.69 +msgstr ""
    3.70 +
    3.71 +#: mediabox:22
    3.72 +msgid "Commands:"
    3.73 +msgstr ""
    3.74 +
    3.75 +#: mediabox:25
    3.76 +msgid "Examples:"
    3.77 +msgstr ""
    3.78 +
    3.79 +#: mediabox:61
    3.80 +msgid "Adding playlist:"
    3.81 +msgstr ""
    3.82 +
    3.83 +#: mediabox:62
    3.84 +msgid "Playlist tracks:"
    3.85 +msgstr ""
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/server.sh	Thu Feb 23 21:48:05 2017 +0100
     4.3 @@ -0,0 +1,16 @@
     4.4 +#!/bin/sh
     4.5 +#
     4.6 +# server.sh - Serve MediBox via Busybox HTTPd for development
     4.7 +#
     4.8 +. /lib/libtaz.sh
     4.9 +
    4.10 +if [ -d "cache" ]; then
    4.11 +	port=8090
    4.12 +	echo "Starting server on port: $port"
    4.13 +	echo "URL: $(boldify http://localhost:$port/)"
    4.14 +	echo "Press CTRL+C to stop the server"
    4.15 +	httpd -f -u www:www -p ${port} -c data/httpd.conf
    4.16 +else
    4.17 +	echo "Missing cache dir: cache/"
    4.18 +	echo "install -d -m 0777 cache"
    4.19 +fi && exit 0