From ffb671c61a24a9086343b54bad080e145ff33fc5 Mon Sep 17 00:00:00 2001 From: Dererk Date: Tue, 15 Nov 2016 14:18:46 -0300 Subject: New upstream version 7.8.1 --- snapcraft/README | 25 +++++++++++++++++++++++++ snapcraft/build.sh | 6 ++++++ snapcraft/edge/build.sh | 6 ++++++ snapcraft/edge/nikola.png | Bin 0 -> 4767 bytes snapcraft/edge/nikola.sh | 21 +++++++++++++++++++++ snapcraft/edge/release.sh | 1 + snapcraft/edge/requirements.txt | 27 +++++++++++++++++++++++++++ snapcraft/edge/snapcraft.yaml | 32 ++++++++++++++++++++++++++++++++ snapcraft/nikola.png | Bin 0 -> 4767 bytes snapcraft/nikola.py | 10 ++++++++++ snapcraft/nikola.sh | 21 +++++++++++++++++++++ snapcraft/requirements.txt | 27 +++++++++++++++++++++++++++ snapcraft/snapcraft.yaml | 33 +++++++++++++++++++++++++++++++++ snapcraft/stable/build.sh | 6 ++++++ snapcraft/stable/nikola.png | Bin 0 -> 4767 bytes snapcraft/stable/nikola.sh | 21 +++++++++++++++++++++ snapcraft/stable/release.sh | 1 + snapcraft/stable/requirements.txt | 27 +++++++++++++++++++++++++++ snapcraft/stable/snapcraft.yaml | 33 +++++++++++++++++++++++++++++++++ 19 files changed, 297 insertions(+) create mode 100644 snapcraft/README create mode 100755 snapcraft/build.sh create mode 100755 snapcraft/edge/build.sh create mode 100644 snapcraft/edge/nikola.png create mode 100755 snapcraft/edge/nikola.sh create mode 100755 snapcraft/edge/release.sh create mode 100644 snapcraft/edge/requirements.txt create mode 100644 snapcraft/edge/snapcraft.yaml create mode 100644 snapcraft/nikola.png create mode 100755 snapcraft/nikola.py create mode 100755 snapcraft/nikola.sh create mode 100644 snapcraft/requirements.txt create mode 100644 snapcraft/snapcraft.yaml create mode 100755 snapcraft/stable/build.sh create mode 100644 snapcraft/stable/nikola.png create mode 100755 snapcraft/stable/nikola.sh create mode 100755 snapcraft/stable/release.sh create mode 100644 snapcraft/stable/requirements.txt create mode 100644 snapcraft/stable/snapcraft.yaml (limited to 'snapcraft') diff --git a/snapcraft/README b/snapcraft/README new file mode 100644 index 0000000..d026ae8 --- /dev/null +++ b/snapcraft/README @@ -0,0 +1,25 @@ +The folders edge/stable contain the files needed to build a snap package for Nikola. +Edge will build from master, stable from the latest release. + +To build, in Ubuntu 16.04: + +apt install snapd snapcraft +snap login some.account@whatever.com +./build.sh + +To just use it: + +apt install snapd +snap login some.account@whatever.com +snap install nikola + + +That should leave you with a working "nikola" command (/snap/bin/nikola if /snap/bin is not in your $PATH), +which is functional with the following caveats: + +* Locales are a bit broken: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1576411 +* The -b option in nikola serve and nikola auto will not work (need to use snap-xdg-open it seems) +* Plugin installation is tricky +* Your site needs to live in your home +* You can't use "nikola deploy". +* Probaby other things I have not noticed yet. diff --git a/snapcraft/build.sh b/snapcraft/build.sh new file mode 100755 index 0000000..d0148d9 --- /dev/null +++ b/snapcraft/build.sh @@ -0,0 +1,6 @@ +#!/bin/sh +snapcraft +cp nikola.py stage/usr/bin/nikola +find prime/ -name '*.a' -exec rm {} \; +snapcraft + diff --git a/snapcraft/edge/build.sh b/snapcraft/edge/build.sh new file mode 100755 index 0000000..fa6dc14 --- /dev/null +++ b/snapcraft/edge/build.sh @@ -0,0 +1,6 @@ +#!/bin/sh +snapcraft +cp ../nikola.py prime/usr/bin/nikola +find prime/ -name '*.a' -exec rm {} \; +snapcraft + diff --git a/snapcraft/edge/nikola.png b/snapcraft/edge/nikola.png new file mode 100644 index 0000000..ce583bf Binary files /dev/null and b/snapcraft/edge/nikola.png differ diff --git a/snapcraft/edge/nikola.sh b/snapcraft/edge/nikola.sh new file mode 100755 index 0000000..82da543 --- /dev/null +++ b/snapcraft/edge/nikola.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +export HOME=$SNAP_USER_DATA + +export I18NPATH=$SNAP/usr/share/i18n +export LOCPATH=$SNAP_USER_DATA + +APPLANG=en_US +APPENC=UTF-8 +APPLOC="$APPLANG.$APPENC" + +# generate a locale so we get properly working charsets and graphics +if [ ! -e $SNAP_USER_DATA/$APPLOC ]; then + localedef --prefix=$SNAP_USER_DATA -f $APPENC -i $APPLANG $SNAP_USER_DATA/$APPLOC +fi + +export LC_ALL=$APPLOC +export LANG=$APPLOC +export LANGUAGE=${APPLANG%_*} + +$SNAP/usr/bin/nikola "$@" diff --git a/snapcraft/edge/release.sh b/snapcraft/edge/release.sh new file mode 100755 index 0000000..f05935e --- /dev/null +++ b/snapcraft/edge/release.sh @@ -0,0 +1 @@ +snapcraft push nikola_master_amd64.snap --release edge diff --git a/snapcraft/edge/requirements.txt b/snapcraft/edge/requirements.txt new file mode 100644 index 0000000..063f588 --- /dev/null +++ b/snapcraft/edge/requirements.txt @@ -0,0 +1,27 @@ +Markdown>=2.4.0 +Jinja2>=2.7.2 +pyphen>=0.9.1 +micawber>=0.3.0 +pygal>=2.0.0 +typogrify>=2.0.4 +phpserialize>=1.3 +webassets>=0.10.1 +ghp-import2>=1.0.0 +ws4py==0.3.5 +watchdog==0.8.3 +doit>=0.28.0,<=0.29.0 +Pygments>=1.6 +python-dateutil>=2.4.0 +docutils>=0.12 +mako>=1.0.0 +unidecode>=0.04.16 +lxml>=3.3.5 +Yapsy>=1.11.223 +PyRSS2Gen>=1.1 +logbook>=0.7.0 +blinker>=1.3 +setuptools>=5.4.1 +natsort>=3.5.2 +requests>=2.2.0 +husl>=4.0.2 +piexif>=1.0.3 diff --git a/snapcraft/edge/snapcraft.yaml b/snapcraft/edge/snapcraft.yaml new file mode 100644 index 0000000..a9d31dd --- /dev/null +++ b/snapcraft/edge/snapcraft.yaml @@ -0,0 +1,32 @@ +name: nikola +version: master +summary: A static website generator +description: A static website generator +confinement: strict + +apps: + nikola: + command: nikola.sh + plugs: [network, network-bind, home] + +parts: + nikola: + plugin: copy + files: + nikola.sh: nikola.sh + nikola-source: + plugin: python3 + source: git://github.com/getnikola/nikola.git + requirements: requirements.txt + stage-packages: + - locales + - libc-bin + - python3-lxml + - python3-pil + build-packages: + - zlib1g-dev + - libjpeg-turbo8-dev + - libpng12-dev + - libxslt1-dev + - libxml2-dev + - gcc diff --git a/snapcraft/nikola.png b/snapcraft/nikola.png new file mode 100644 index 0000000..ce583bf Binary files /dev/null and b/snapcraft/nikola.png differ diff --git a/snapcraft/nikola.py b/snapcraft/nikola.py new file mode 100755 index 0000000..624fcd3 --- /dev/null +++ b/snapcraft/nikola.py @@ -0,0 +1,10 @@ +#!/snap/nikola/current/usr/bin/python3 +# EASY-INSTALL-ENTRY-SCRIPT: 'Nikola==7.8.1' +__requires__ = 'Nikola==7.8.1' +import sys +from pkg_resources import load_entry_point + +if __name__ == '__main__': + sys.exit( + load_entry_point('Nikola', 'console_scripts', 'nikola')() + ) diff --git a/snapcraft/nikola.sh b/snapcraft/nikola.sh new file mode 100755 index 0000000..82da543 --- /dev/null +++ b/snapcraft/nikola.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +export HOME=$SNAP_USER_DATA + +export I18NPATH=$SNAP/usr/share/i18n +export LOCPATH=$SNAP_USER_DATA + +APPLANG=en_US +APPENC=UTF-8 +APPLOC="$APPLANG.$APPENC" + +# generate a locale so we get properly working charsets and graphics +if [ ! -e $SNAP_USER_DATA/$APPLOC ]; then + localedef --prefix=$SNAP_USER_DATA -f $APPENC -i $APPLANG $SNAP_USER_DATA/$APPLOC +fi + +export LC_ALL=$APPLOC +export LANG=$APPLOC +export LANGUAGE=${APPLANG%_*} + +$SNAP/usr/bin/nikola "$@" diff --git a/snapcraft/requirements.txt b/snapcraft/requirements.txt new file mode 100644 index 0000000..063f588 --- /dev/null +++ b/snapcraft/requirements.txt @@ -0,0 +1,27 @@ +Markdown>=2.4.0 +Jinja2>=2.7.2 +pyphen>=0.9.1 +micawber>=0.3.0 +pygal>=2.0.0 +typogrify>=2.0.4 +phpserialize>=1.3 +webassets>=0.10.1 +ghp-import2>=1.0.0 +ws4py==0.3.5 +watchdog==0.8.3 +doit>=0.28.0,<=0.29.0 +Pygments>=1.6 +python-dateutil>=2.4.0 +docutils>=0.12 +mako>=1.0.0 +unidecode>=0.04.16 +lxml>=3.3.5 +Yapsy>=1.11.223 +PyRSS2Gen>=1.1 +logbook>=0.7.0 +blinker>=1.3 +setuptools>=5.4.1 +natsort>=3.5.2 +requests>=2.2.0 +husl>=4.0.2 +piexif>=1.0.3 diff --git a/snapcraft/snapcraft.yaml b/snapcraft/snapcraft.yaml new file mode 100644 index 0000000..d149c79 --- /dev/null +++ b/snapcraft/snapcraft.yaml @@ -0,0 +1,33 @@ +name: nikola +version: 7.7.12 +summary: A static website generator +description: A static website generator +confinement: strict + +apps: + nikola: + command: nikola.sh + plugs: [network, network-bind, home] + +parts: + nikola: + plugin: copy + files: + nikola.sh: nikola.sh + nikola-source: + plugin: python3 + source: git://github.com/getnikola/nikola.git + source-tag: v7.7.12 + requirements: requirements.txt + stage-packages: + - locales + - libc-bin + - python3-lxml + - python3-pil + build-packages: + - zlib1g-dev + - libjpeg-turbo8-dev + - libpng12-dev + - libxslt1-dev + - libxml2-dev + - gcc diff --git a/snapcraft/stable/build.sh b/snapcraft/stable/build.sh new file mode 100755 index 0000000..fa6dc14 --- /dev/null +++ b/snapcraft/stable/build.sh @@ -0,0 +1,6 @@ +#!/bin/sh +snapcraft +cp ../nikola.py prime/usr/bin/nikola +find prime/ -name '*.a' -exec rm {} \; +snapcraft + diff --git a/snapcraft/stable/nikola.png b/snapcraft/stable/nikola.png new file mode 100644 index 0000000..ce583bf Binary files /dev/null and b/snapcraft/stable/nikola.png differ diff --git a/snapcraft/stable/nikola.sh b/snapcraft/stable/nikola.sh new file mode 100755 index 0000000..82da543 --- /dev/null +++ b/snapcraft/stable/nikola.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +export HOME=$SNAP_USER_DATA + +export I18NPATH=$SNAP/usr/share/i18n +export LOCPATH=$SNAP_USER_DATA + +APPLANG=en_US +APPENC=UTF-8 +APPLOC="$APPLANG.$APPENC" + +# generate a locale so we get properly working charsets and graphics +if [ ! -e $SNAP_USER_DATA/$APPLOC ]; then + localedef --prefix=$SNAP_USER_DATA -f $APPENC -i $APPLANG $SNAP_USER_DATA/$APPLOC +fi + +export LC_ALL=$APPLOC +export LANG=$APPLOC +export LANGUAGE=${APPLANG%_*} + +$SNAP/usr/bin/nikola "$@" diff --git a/snapcraft/stable/release.sh b/snapcraft/stable/release.sh new file mode 100755 index 0000000..332b426 --- /dev/null +++ b/snapcraft/stable/release.sh @@ -0,0 +1 @@ +snapcraft push nikola_*_amd64.snap --release stable,beta,candidate diff --git a/snapcraft/stable/requirements.txt b/snapcraft/stable/requirements.txt new file mode 100644 index 0000000..063f588 --- /dev/null +++ b/snapcraft/stable/requirements.txt @@ -0,0 +1,27 @@ +Markdown>=2.4.0 +Jinja2>=2.7.2 +pyphen>=0.9.1 +micawber>=0.3.0 +pygal>=2.0.0 +typogrify>=2.0.4 +phpserialize>=1.3 +webassets>=0.10.1 +ghp-import2>=1.0.0 +ws4py==0.3.5 +watchdog==0.8.3 +doit>=0.28.0,<=0.29.0 +Pygments>=1.6 +python-dateutil>=2.4.0 +docutils>=0.12 +mako>=1.0.0 +unidecode>=0.04.16 +lxml>=3.3.5 +Yapsy>=1.11.223 +PyRSS2Gen>=1.1 +logbook>=0.7.0 +blinker>=1.3 +setuptools>=5.4.1 +natsort>=3.5.2 +requests>=2.2.0 +husl>=4.0.2 +piexif>=1.0.3 diff --git a/snapcraft/stable/snapcraft.yaml b/snapcraft/stable/snapcraft.yaml new file mode 100644 index 0000000..e85e88b --- /dev/null +++ b/snapcraft/stable/snapcraft.yaml @@ -0,0 +1,33 @@ +name: nikola +version: 7.8.1 +summary: A static website generator +description: A static website generator +confinement: strict + +apps: + nikola: + command: nikola.sh + plugs: [network, network-bind, home] + +parts: + nikola: + plugin: copy + files: + nikola.sh: nikola.sh + nikola-source: + plugin: python3 + source: git://github.com/getnikola/nikola.git + source-tag: v7.8.1 + requirements: requirements.txt + stage-packages: + - locales + - libc-bin + - python3-lxml + - python3-pil + build-packages: + - zlib1g-dev + - libjpeg-turbo8-dev + - libpng12-dev + - libxslt1-dev + - libxml2-dev + - gcc -- cgit v1.2.3