Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
This folder contains an experimental attempt to build a snap package for nikola. | ||
|
||
To build, in Ubuntu 16.04: | ||
|
||
apt install snapd snapcraft | ||
snap login some.account@whatever.com | ||
snapcraft | ||
snapd install nikola*snap --devmode | ||
|
||
To just use it: | ||
|
||
apt install snapd snapcraft | ||
snap login some.account@whatever.com | ||
snap install nikola | ||
|
||
|
||
That should leave you with a woring "nikola" command, which is functional with the | ||
following caveats: | ||
|
||
* Locales are broken: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1576411 | ||
* It needs to run in devmode (unconfined). I am not sure it makes much sense to | ||
try to use it otherwise, and in any case it doesn't work for a variety of bugs. | ||
* The -b option in nikola serve and nikola auto will not work | ||
* Probaby other things I have not noticed yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
export HOME=$SNAP_APP_USER_DATA | ||
export HACKDIR=$SNAP_APP_USER_DATA | ||
export NETHACKOPTIONS=$SNAP_APP_USER_DATA/.nethackrc | ||
|
||
export I18NPATH=$SNAP_APP_PATH/usr/share/i18n | ||
export LOCPATH=$SNAP_APP_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_APP_USER_DATA/$APPLOC ]; then | ||
localedef --prefix=$SNAP_APP_USER_DATA -f $APPENC -i $APPLANG $SNAP_APP_USER_DATA/$APPLOC | ||
fi | ||
|
||
export LC_ALL=$APPLOC | ||
export LANG=$APPLOC | ||
export LANGUAGE=${APPLANG%_*} | ||
|
||
$SNAP/usr/bin/nikola "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: nikola | ||
version: 7.7.9 | ||
summary: A static website generator | ||
description: A static website generator | ||
confinement: devmode | ||
|
||
apps: | ||
nikola: | ||
command: nikola.sh | ||
|
||
parts: | ||
nikola: | ||
plugin: copy | ||
files: | ||
nikola.sh: nikola.sh | ||
nikola-source: | ||
plugin: python3 | ||
source: git://github.com/getnikola/nikola.git | ||
source-tag: v7.7.9 | ||
requirements: parts/nikola-source/src/requirements-extras.txt | ||
stage-packages: | ||
- locales | ||
- libc-bin | ||
build-packages: | ||
- zlib1g-dev | ||
- libjpeg-turbo8-dev | ||
- libpng12-dev | ||
- libxslt1-dev | ||
- libxml2-dev | ||
- gcc | ||
|