user/scanservjs: match to MR
This commit is contained in:
parent
6794ae256b
commit
bf05c42c8c
1 changed files with 23 additions and 22 deletions
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
pkgname=scanservjs
|
pkgname=scanservjs
|
||||||
pkgver=2.21.0
|
pkgver=2.21.0
|
||||||
pkgrel=1
|
pkgrel=0
|
||||||
pkgdesc="SANE scanner nodejs web ui"
|
pkgdesc="SANE scanner nodejs web ui"
|
||||||
arch="noarch"
|
arch="noarch"
|
||||||
url="https://github.com/sbs20/scanservjs"
|
url="https://github.com/sbs20/scanservjs"
|
||||||
|
@ -17,7 +17,7 @@ depends="
|
||||||
"
|
"
|
||||||
makedepends="npm"
|
makedepends="npm"
|
||||||
subpackages="$pkgname-doc $pkgname-openrc"
|
subpackages="$pkgname-doc $pkgname-openrc"
|
||||||
options="!check"
|
options="!check" # No testsuite
|
||||||
|
|
||||||
source="
|
source="
|
||||||
$pkgname-$pkgver.tar.gz::https://github.com/sbs20/scanservjs/archive/refs/tags/v$pkgver.tar.gz
|
$pkgname-$pkgver.tar.gz::https://github.com/sbs20/scanservjs/archive/refs/tags/v$pkgver.tar.gz
|
||||||
|
@ -26,36 +26,37 @@ source="
|
||||||
"
|
"
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
npm run install
|
# Uses version of webpack which is partially broken on nodejs >16
|
||||||
npm run build
|
export NODE_OPTIONS=--openssl-legacy-provider
|
||||||
|
npm run install
|
||||||
|
npm run build
|
||||||
|
|
||||||
cd dist
|
cd dist
|
||||||
npm install --production
|
npm install --production
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
# install documentation
|
# install documentation
|
||||||
install -Dm644 ./docs/* -t "$pkgdir/usr/share/doc/scanservjs/"
|
install -Dm644 ./docs/* -t "$pkgdir/usr/share/doc/scanservjs/"
|
||||||
|
|
||||||
install -d "$pkgdir/usr/share/webapps/scanservjs" "$pkgdir/etc/webapps/scanservjs" "$pkgdir/var/lib/webapps/scanservjs"
|
install -d "$pkgdir/usr/share/webapps/scanservjs" "$pkgdir/etc/webapps/scanservjs" "$pkgdir/var/lib/webapps/scanservjs"
|
||||||
|
|
||||||
# install main files
|
# install main files
|
||||||
cp -r dist/* "$pkgdir/usr/share/webapps/scanservjs/"
|
cp -r dist/* "$pkgdir/usr/share/webapps/scanservjs/"
|
||||||
rm -r "$pkgdir"/usr/share/webapps/scanservjs/scanservjs.service
|
rm -r "$pkgdir"/usr/share/webapps/scanservjs/scanservjs.service
|
||||||
rm -r "$pkgdir"/usr/share/webapps/scanservjs/installer.sh
|
rm -r "$pkgdir"/usr/share/webapps/scanservjs/installer.sh
|
||||||
|
|
||||||
chmod +x "$pkgdir"/usr/share/webapps/scanservjs/server/server.js
|
chmod +x "$pkgdir"/usr/share/webapps/scanservjs/server/server.js
|
||||||
|
|
||||||
mv "$pkgdir"/usr/share/webapps/scanservjs/config/* "$pkgdir/etc/webapps/scanservjs/"
|
mv "$pkgdir"/usr/share/webapps/scanservjs/config/* "$pkgdir/etc/webapps/scanservjs/"
|
||||||
mv "$pkgdir"/usr/share/webapps/scanservjs/data/* "$pkgdir/var/lib/webapps/scanservjs/"
|
mv "$pkgdir"/usr/share/webapps/scanservjs/data/* "$pkgdir/var/lib/webapps/scanservjs/"
|
||||||
|
|
||||||
|
rmdir "$pkgdir"/usr/share/webapps/scanservjs/config "$pkgdir/usr/share/webapps/scanservjs/data"
|
||||||
|
ln -s /etc/webapps/scanservjs "$pkgdir/usr/share/webapps/scanservjs/config"
|
||||||
|
ln -s /var/lib/webapps/scanservjs "$pkgdir/usr/share/webapps/scanservjs/data"
|
||||||
|
|
||||||
rmdir "$pkgdir"/usr/share/webapps/scanservjs/config "$pkgdir/usr/share/webapps/scanservjs/data"
|
install -Dm 755 "$srcdir"/scanservjs.initd "$pkgdir"/etc/init.d/scanservjs
|
||||||
ln -s /etc/webapps/scanservjs "$pkgdir/usr/share/webapps/scanservjs/config"
|
install -Dm 644 "$srcdir"/scanservjs.conf "$pkgdir"/etc/conf.d/scanservjs
|
||||||
ln -s /var/lib/webapps/scanservjs "$pkgdir/usr/share/webapps/scanservjs/data"
|
|
||||||
|
|
||||||
install -Dm 755 "$srcdir"/scanservjs.initd "$pkgdir"/etc/init.d/scanservjs
|
|
||||||
install -Dm 644 "$srcdir"/scanservjs.conf "$pkgdir"/etc/conf.d/scanservjs
|
|
||||||
}
|
}
|
||||||
sha512sums="
|
sha512sums="
|
||||||
1ee256bc6c38ccf1fcf196926f7fdbff6ff8d7e800a414ee5d45ad3b430c3f9055856d96181520b2f24e2d067f5ffc49fb7fd543fff8d0352517d1b7ccd12fd2 scanservjs-2.21.0.tar.gz
|
1ee256bc6c38ccf1fcf196926f7fdbff6ff8d7e800a414ee5d45ad3b430c3f9055856d96181520b2f24e2d067f5ffc49fb7fd543fff8d0352517d1b7ccd12fd2 scanservjs-2.21.0.tar.gz
|
||||||
|
|
Loading…
Reference in a new issue