github.com/rabbouni145/gg@v0.47.1/snapcraft.yaml (about) 1 name: hugo 2 version: "0.47.1" 3 summary: Fast and Flexible Static Site Generator 4 description: | 5 Hugo is a static HTML and CSS website generator written in Go. It is 6 optimized for speed, easy use and configurability. Hugo takes a directory 7 with content and templates and renders them into a full HTML website. 8 confinement: strict 9 grade: stable # "devel" or "stable" 10 11 apps: 12 hugo: 13 command: bin/hugo 14 completer: hugo-completion 15 plugs: [home, network-bind, removable-media] 16 17 parts: 18 hugo: 19 source: . 20 plugin: go 21 go-importpath: github.com/gohugoio/hugo 22 build-packages: 23 - git 24 stage-packages: 25 - git 26 - nodejs 27 - python-pygments 28 override-build: | 29 echo "\nStarting override-build:" 30 export GOPATH=$(dirname $SNAPCRAFT_PART_INSTALL)/go 31 export PATH=$GOPATH/bin:$PATH 32 cd $GOPATH/src/github.com/gohugoio/hugo 33 echo ' * Running "go get -v github.com/magefile/mage"...' 34 go get -v github.com/magefile/mage 35 echo ' * Running "mage -v vendor"...' 36 mage -v vendor 37 echo ' * Running "mage -v test"...' 38 mage -v test 39 echo " * Building hugo (build tag: none)..." 40 [ "$SNAPCRAFT_PROJECT_GRADE" = "stable" ] && mage -v hugoNoGitInfo || mage -v hugo 41 ./hugo version 42 ldd hugo || : 43 echo " * Building shell completion..." 44 ./hugo gen autocomplete --completionfile=hugo-completion 45 echo " * Installing to ${SNAPCRAFT_PART_INSTALL}..." 46 install -d $SNAPCRAFT_PART_INSTALL/bin 47 cp -av hugo $SNAPCRAFT_PART_INSTALL/bin/ 48 mv -v hugo-completion $SNAPCRAFT_PART_INSTALL/ 49 echo " * Stripping binary..." 50 ls -l $SNAPCRAFT_PART_INSTALL/bin/hugo 51 strip --remove-section=.comment --remove-section=.note $SNAPCRAFT_PART_INSTALL/bin/hugo 52 ls -l $SNAPCRAFT_PART_INSTALL/bin/hugo 53 echo " * Remove unneeded files..." 54 rm -rf $SNAPCRAFT_PART_INSTALL/etc 55 rm -f $SNAPCRAFT_PART_INSTALL/usr/bin/[^gp]* 56 rm -f $SNAPCRAFT_PART_INSTALL/usr/bin/git-* 57 rm -f $SNAPCRAFT_PART_INSTALL/usr/bin/p[^y]* 58 rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-[^lr]* 59 rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-ls-* 60 rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-re[^v]* 61 rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-revert 62 rm -f $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/git-rm 63 rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/git-core/mergetools 64 rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/*/perl 65 rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/mime 66 rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/python*/lib2to3 67 rm -rf $SNAPCRAFT_PART_INSTALL/usr/lib/valgrind 68 rm -rf $SNAPCRAFT_PART_INSTALL/usr/sbin 69 rm -rf $SNAPCRAFT_PART_INSTALL/usr/share/[^p]* 70 rm -rf $SNAPCRAFT_PART_INSTALL/usr/share/p[^y]* 71 rm -rf $SNAPCRAFT_PART_INSTALL/var 72 after: [go] 73 go: 74 source-tag: go1.10.3