mirror of
https://github.com/kiwix/kiwix-js.git
synced 2025-09-23 12:36:21 -04:00
Merge pull request #295 from kiwix/add-ubuntu-touch-click-packaging
Add ubuntu touch click packaging
This commit is contained in:
commit
216d50a261
@ -1,3 +1,5 @@
|
||||
sudo : true
|
||||
dist : trusty
|
||||
language: node_js
|
||||
node_js:
|
||||
- "node"
|
||||
@ -16,11 +18,11 @@ script:
|
||||
deploy:
|
||||
- provider: script
|
||||
# Nightly builds (launched by cron)
|
||||
script: ./scripts/setup_travis_env.sh && DISPLAY=:99.0 ./scripts/create_all_packages.sh
|
||||
script: sudo apt-get update -q && sudo apt-get --yes install click click-reviewers-tools && ./scripts/setup_travis_env.sh && DISPLAY=:99.0 ./scripts/create_all_packages.sh
|
||||
on:
|
||||
condition: ( "$TRAVIS_EVENT_TYPE" = "cron" )
|
||||
- provider: script
|
||||
# Generation of packages for public releases (launched by a tag)
|
||||
script: ./scripts/setup_travis_env.sh && DISPLAY=:99.0 ./scripts/create_all_packages.sh -t -v ${TRAVIS_TAG}
|
||||
script: sudo apt-get update -q && sudo apt-get --yes install click click-reviewers-tools && ./scripts/setup_travis_env.sh && DISPLAY=:99.0 ./scripts/create_all_packages.sh -t -v ${TRAVIS_TAG}
|
||||
on:
|
||||
tags: true
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
|
||||
echo "BASEDIR is $BASEDIR"
|
||||
cd $BASEDIR
|
||||
cd "$BASEDIR"
|
||||
|
||||
# Reading arguments
|
||||
while getopts tdv: option; do
|
||||
@ -62,6 +62,9 @@ cp manifest.json tmp/
|
||||
sed -i -e "s/$VERSION_TO_REPLACE/$VERSION/" tmp/manifest.json
|
||||
scripts/package_firefox_extension.sh $DRYRUN $TAG -v $VERSION
|
||||
scripts/package_firefoxos_app.sh $DRYRUN $TAG -v $VERSION
|
||||
cp -f ubuntu_touch/* tmp/
|
||||
sed -i -e "s/$VERSION_TO_REPLACE/$VERSION/" tmp/manifest.json
|
||||
scripts/package_ubuntu_touch_app.sh $DRYRUN $TAG -v $VERSION
|
||||
|
||||
if [ "${DRYRUN}zz" == "zz" ]; then
|
||||
CURRENT_DATE=$(date +'%Y-%m-%d')
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
|
||||
cd $BASEDIR
|
||||
cd "$BASEDIR"
|
||||
|
||||
# Reading arguments
|
||||
while getopts tdv: option; do
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
|
||||
cd $BASEDIR
|
||||
cd "$BASEDIR"
|
||||
|
||||
# Reading arguments
|
||||
while getopts tdv: option; do
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
|
||||
cd $BASEDIR/tmp
|
||||
cd "$BASEDIR/tmp"
|
||||
|
||||
# Reading arguments
|
||||
while getopts tdv: option; do
|
||||
|
29
scripts/package_ubuntu_touch_app.sh
Executable file
29
scripts/package_ubuntu_touch_app.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# to install:
|
||||
#
|
||||
# $ adb push kiwix-*.click /tmp
|
||||
# $ adb shell
|
||||
# $ pkcon install-local --allow-untrusted /tmp/kiwix-*.click
|
||||
|
||||
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
|
||||
cd "$BASEDIR/tmp"
|
||||
|
||||
# Reading arguments
|
||||
while getopts tdv: option; do
|
||||
case "${option}" in
|
||||
t) TAG="-t";; # Indicates that we're releasing a public version from a tag
|
||||
d) DRYRUN="-d";; # Indicates a dryrun test, that does not modify anything on the network
|
||||
v) VERSION=${OPTARG};;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "Packaging .click application for Ubuntu Touch, version $VERSION"
|
||||
|
||||
# We need to remove the *.woff* files because click considers they are forbidden binaries
|
||||
rm -f "$BASEDIR/tmp/www/fonts/*.woff*"
|
||||
# We need to remove these files because the --ignore option of click is not supported in the version of Trusty
|
||||
rm -rf "$BASEDIR/tmp/webextension"
|
||||
rm -f "$BASEDIR/tmp/manifest.webapp"
|
||||
click build "$BASEDIR/tmp"
|
||||
mv kiwix*.click $BASEDIR/build/kiwix-ubuntu-touch-$VERSION.click
|
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
|
||||
cd $BASEDIR
|
||||
cd "$BASEDIR"
|
||||
git checkout gh-pages && git merge master && git push origin gh-pages && git checkout master
|
||||
|
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
|
||||
# Decrypt the secret files
|
||||
openssl aes-256-cbc -K $encrypted_3275b0f28807_key -iv $encrypted_3275b0f28807_iv -in $BASEDIR/scripts/secret_files.tar.gz.enc -out $BASEDIR/scripts/secret_files.tar.gz -d
|
||||
tar xvzf $BASEDIR/scripts/secret_files.tar.gz --directory $BASEDIR/scripts/
|
||||
openssl aes-256-cbc -K $encrypted_3275b0f28807_key -iv $encrypted_3275b0f28807_iv -in "$BASEDIR/scripts/secret_files.tar.gz.enc" -out "$BASEDIR/scripts/secret_files.tar.gz" -d
|
||||
tar xvzf "$BASEDIR/scripts/secret_files.tar.gz" --directory "$BASEDIR/scripts/"
|
||||
# On Travis, we need to make Chromium believe it has a display else it fails signing the package
|
||||
export DISPLAY=:99.0
|
||||
sh -e /etc/init.d/xvfb start
|
||||
|
10
ubuntu_touch/kiwix.apparmor
Normal file
10
ubuntu_touch/kiwix.apparmor
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"template": "ubuntu-webapp",
|
||||
"policy_groups": [
|
||||
"networking",
|
||||
"webview",
|
||||
"content_exchange",
|
||||
"content_exchange_source"
|
||||
],
|
||||
"policy_version": 1.3
|
||||
}
|
9
ubuntu_touch/kiwix.desktop
Normal file
9
ubuntu_touch/kiwix.desktop
Normal file
@ -0,0 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Name=kiwix
|
||||
Comment=kiwix for Ubuntu Touch
|
||||
Exec=webapp-container $@ ./www/index.html
|
||||
Terminal=false
|
||||
Type=Application
|
||||
X-Ubuntu-Touch=true
|
||||
Icon=./www/img/icons/kiwix-256.png
|
||||
Name[en_US]=kiwix.desktop
|
15
ubuntu_touch/manifest.json
Normal file
15
ubuntu_touch/manifest.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "kiwix",
|
||||
"description": "Kiwix : offline Wikipedia reader",
|
||||
"architecture": "all",
|
||||
"maintainer": "Kiwix team <contact+ubuntutouch@kiwix.org>",
|
||||
"framework" : "ubuntu-sdk-15.04.5",
|
||||
"version" : "2.2-WIP",
|
||||
"title": "kiwix",
|
||||
"hooks": {
|
||||
"ubports-little-webapp": {
|
||||
"apparmor": "kiwix.apparmor",
|
||||
"desktop": "kiwix.desktop"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user