mirror of
https://github.com/MatMoul/dokytree.git
synced 2024-12-23 16:16:12 +00:00
Add packaging folder
This commit is contained in:
parent
56fa5970af
commit
cae4b73f19
41
packaging/archlinux/dokytree-git/PKGBUILD
Normal file
41
packaging/archlinux/dokytree-git/PKGBUILD
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# Maintainer: MatMoul <matmoul at the google email domain which is .com>
|
||||||
|
|
||||||
|
_githubuser=matmoul
|
||||||
|
_githubrepo=dokytree
|
||||||
|
_gitcommit=56fa5970af2c659e730a850f923b6983a842f85c
|
||||||
|
|
||||||
|
pkgname=dokytree-git
|
||||||
|
pkgver=0.0.0.r1.56fa597
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='A versatil documentation system based on yaml files in directory tree with pugjs templates '
|
||||||
|
arch=('any')
|
||||||
|
url="https://github.com/${_githubuser}/${_githubrepo}"
|
||||||
|
license=('GPL3')
|
||||||
|
depends=('nodejs')
|
||||||
|
optdepends=(
|
||||||
|
'code: To edit doc'
|
||||||
|
'chromium: To view and print as pdf doc'
|
||||||
|
'wget: To export doc as static pages'
|
||||||
|
'unzip: To build Windows ZIP'
|
||||||
|
)
|
||||||
|
makedepends=('git')
|
||||||
|
source=("git+https://github.com/${_githubuser}/${_githubrepo}.git#commit=${_gitcommit}")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "${_githubrepo}"
|
||||||
|
cat <<EOF > dokytree
|
||||||
|
#!/bin/bash
|
||||||
|
node /usr/share/dokytree/app.js \${1} \${2} \${3} \${4} \${5} \${6}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${_githubrepo}"
|
||||||
|
install -D -m0644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
|
||||||
|
install -d -m0755 ${pkgdir}/usr/share/dokytree
|
||||||
|
install -d -m0755 ${pkgdir}/usr/share/dokytree/samples
|
||||||
|
cp -R src/* ${pkgdir}/usr/share/dokytree
|
||||||
|
cp -R samples/* ${pkgdir}/usr/share/dokytree/samples
|
||||||
|
install -D -m0755 dokytree ${pkgdir}/usr/bin/dokytree
|
||||||
|
}
|
41
packaging/archlinux/dokytree/PKGBUILD
Normal file
41
packaging/archlinux/dokytree/PKGBUILD
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
# Maintainer: MatMoul <matmoul at the google email domain which is .com>
|
||||||
|
|
||||||
|
_githubuser=matmoul
|
||||||
|
_githubrepo=dokytree
|
||||||
|
_gitcommit=56fa5970af2c659e730a850f923b6983a842f85c
|
||||||
|
|
||||||
|
pkgname=dokytree-git
|
||||||
|
pkgver=0.0.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='A versatil documentation system based on yaml files in directory tree with pugjs templates '
|
||||||
|
arch=('any')
|
||||||
|
url="https://github.com/${_githubuser}/${_githubrepo}"
|
||||||
|
license=('GPL3')
|
||||||
|
depends=('nodejs')
|
||||||
|
optdepends=(
|
||||||
|
'code: To edit doc'
|
||||||
|
'chromium: To view and print as pdf doc'
|
||||||
|
'wget: To export doc as static pages'
|
||||||
|
'unzip: To build Windows ZIP'
|
||||||
|
)
|
||||||
|
makedepends=('git')
|
||||||
|
source=("git+https://github.com/${_githubuser}/${_githubrepo}.git#commit=${_gitcommit}")
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
cd "${_githubrepo}"
|
||||||
|
cat <<EOF > dokytree
|
||||||
|
#!/bin/bash
|
||||||
|
node /usr/share/dokytree/app.js \${1} \${2} \${3} \${4} \${5} \${6}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd "${_githubrepo}"
|
||||||
|
install -D -m0644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
|
||||||
|
install -d -m0755 ${pkgdir}/usr/share/dokytree
|
||||||
|
install -d -m0755 ${pkgdir}/usr/share/dokytree/samples
|
||||||
|
cp -R src/* ${pkgdir}/usr/share/dokytree
|
||||||
|
cp -R samples/* ${pkgdir}/usr/share/dokytree/samples
|
||||||
|
install -D -m0755 dokytree ${pkgdir}/usr/bin/dokytree
|
||||||
|
}
|
@ -2,15 +2,20 @@
|
|||||||
|
|
||||||
declare -r APPNAME=dokytree
|
declare -r APPNAME=dokytree
|
||||||
declare -r NODEVER=19.7.0
|
declare -r NODEVER=19.7.0
|
||||||
declare TMPDIR=""
|
declare BASEDIR=""
|
||||||
declare CURDIR=""
|
declare CURDIR=""
|
||||||
|
declare TMPDIR=""
|
||||||
|
|
||||||
|
BASEDIR="$(pwd)"/$(dirname "${0}")/../..
|
||||||
|
echo "${BASEDIR}"
|
||||||
|
|
||||||
|
CURDIR+="$(pwd)"
|
||||||
|
|
||||||
CURDIR=$(pwd)
|
|
||||||
TMPDIR=$(mktemp -d -u)
|
TMPDIR=$(mktemp -d -u)
|
||||||
mkdir -p "${TMPDIR}"/"${APPNAME}"
|
mkdir -p "${TMPDIR}"/"${APPNAME}"
|
||||||
|
|
||||||
cp -R src/* "${TMPDIR}"/"${APPNAME}"
|
cp -R "${BASEDIR}"/src/* "${TMPDIR}"/"${APPNAME}"
|
||||||
cp -R samples "${TMPDIR}"/"${APPNAME}"
|
cp -R "${BASEDIR}"/samples "${TMPDIR}"/"${APPNAME}"
|
||||||
|
|
||||||
cd "${TMPDIR}" || exit
|
cd "${TMPDIR}" || exit
|
||||||
wget https://nodejs.org/dist/v${NODEVER}/node-v${NODEVER}-win-x64.zip
|
wget https://nodejs.org/dist/v${NODEVER}/node-v${NODEVER}-win-x64.zip
|
||||||
@ -18,6 +23,6 @@ unzip node-v${NODEVER}-win-x64.zip
|
|||||||
cp node-v${NODEVER}-win-x64/node.exe "${TMPDIR}"/"${APPNAME}"
|
cp node-v${NODEVER}-win-x64/node.exe "${TMPDIR}"/"${APPNAME}"
|
||||||
|
|
||||||
zip -r "${CURDIR}"/"${APPNAME}".zip "${APPNAME}"
|
zip -r "${CURDIR}"/"${APPNAME}".zip "${APPNAME}"
|
||||||
cd "${CURDIR}" || cd || exit
|
|
||||||
|
|
||||||
|
cd "${CURDIR}" || cd || exit
|
||||||
rm -rf "${TMPDIR}"
|
rm -rf "${TMPDIR}"
|
Loading…
Reference in New Issue
Block a user