PRGNAM=hugo
VERSION=${VERSION:-0.149.0}
BUILD=${BUILD:-1}
-TAG=${TAG:-_SBo}
-PKGTYPE=${PKGTYPE:-tgz}
+TAG=${TAG:-fsleg}
+PKGTYPE=${PKGTYPE:-txz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
TAGS="-tags "
if [ "${EXTENDED:-yes}" = "yes" ]; then
TAGS+="extended,"
+ CFLAGS_SYS="$(pkg-config --cflags libsass) -DUSE_LIBSASS_SRC \
+ $(pkg-config --cflags libwebp) -DLIBWEBP_NO_SRC"
+ LDFLAGS_SYS="$(pkg-config --libs libsass) \
+ $(pkg-config --libs libwebp)"
fi
if [ "${DEPLOY:-yes}" = "yes" ]; then
TAGS+="withdeploy"
fi
CGO_ENABLED=1 \
-CGO_CPPFLAGS="${SLKCFLAGS}" \
-CGO_CFLAGS="${SLKCFLAGS}" \
-CGO_CXXFLAGS="${SLKCFLAGS}" \
+CGO_CFLAGS="$SLKCFLAGS \
+ $CFLAGS_SYS" \
+CGO_CXXFLAGS="$CGO_CFLAGS" \
+CGO_CPPFLAGS="$CGO_CFLAGS" \
+CGO_LDFLAGS="$LDFLAGS_SYS" \
GOPATH=$(pwd)/gocache \
GOCACHE=$(pwd)/gocache \
go build -v \
$PKG/usr/share/bash-completion/completions \
$PKG/usr/share/fish/vendor_completions.d \
$PKG/usr/share/zsh/site-functions
-./hugo gen man --dir $PKG/usr/man/man1
+# hugo can generate man pages as well as docs, however, man pages are harder to read
+# due to bad formatting, otherwise they are identical to docs
+#./hugo gen man --dir $PKG/usr/man/man1
./hugo gen doc --dir $PKG/usr/doc/$PRGNAM-$VERSION
./hugo completion bash > $PKG/usr/share/bash-completion/completions/$PRGNAM
./hugo completion fish > $PKG/usr/share/fish/vendor_completions.d/$PRGNAM.fish
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+#find $PKG/usr/man -type f -exec gzip -9 {} \;
+#for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
cp -a \
CONTRIBUTING.md LICENSE README.md SECURITY.md \
DOWNLOAD="https://github.com/gohugoio/hugo/archive/v0.149.0/hugo-0.149.0.tar.gz \
https://sbo.t-rg.ws/hugo-0.149.0-vendored-sources.tar.xz"
MD5SUM="aaef840fe6d8057b7e7695c34ae11ba9 \
- a99b2b03c4dc02337f2102c420543ad1"
+ b8d29f25d4f295c29308e31c4ad93a41"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="google-go-lang"
go mod vendor
-# libwebp-1.3.2 is the one in Slackware 15, newer ones don't compile
-if [ -e "$CWD/libwebp-1.3.2.tar.gz" ]; then
- cp "$CWD/libwebp-1.3.2.tar.gz" "$TMP/"
-else
- wget --directory-prefix="$TMP" --tries=0 --retry-on-http-error=503 "https://github.com/webmproject/libwebp/archive/v1.3.2/libwebp-v1.3.2.tar.gz"
-fi
-tar xf "$TMP/libwebp-1.3.2.tar.gz" -C ..
-mv "$TMP/libwebp-1.3.2" vendor/github.com/bep/gowebp/libwebp_src
-
-# libsass is deprecated, 3.6.6 is the last release
-if [ -e "$CWD/libsass-3.6.6.tar.gz" ]; then
- cp "$CWD/libsass-3.6.6.tar.gz" "$TMP/"
-else
- wget --directory-prefix="$TMP" --tries=0 --retry-on-http-error=503 "https://github.com/sass/libsass/archive/3.6.6/libsass-3.6.6.tar.gz"
-fi
-tar xf "$TMP/libsass-3.6.6.tar.gz" -C ..
-mv "$TMP/libsass-3.6.6" vendor/github.com/bep/golibsass/libsass_src
-
-if [ -f "$OUTPUT/$PRGNAM-$VERSION-vendored-sources.tar" ]; then
- rm "$OUTPUT/$PRGNAM-$VERSION-vendored-sources.tar"
+if [ -f "$OUTPUT/$PRGNAM-$VERSION-vendored-sources.tar.xz" ]; then
+ rm -v "$OUTPUT/$PRGNAM-$VERSION-vendored-sources.tar.xz"
fi
tar cfJ "$OUTPUT/$PRGNAM-$VERSION-vendored-sources.tar.xz" vendor/
go clean -cache -modcache
cd "$CWD"
-rm -rf "$TMP"
+rm -rv "$TMP"