diff options
author | Timur Demin | 2020-08-04 14:55:11 +0500 |
---|---|---|
committer | Timur Demin | 2020-08-04 14:55:11 +0500 |
commit | ab9f7d1bb9a5fdf55a2cf6ebead8613173588aa1 (patch) | |
tree | d7df3ab71da723bd097ff632a5118be836331819 | |
download | aur-ab9f7d1bb9a5fdf55a2cf6ebead8613173588aa1.tar.gz |
Initial commit
* emdl v2.0.1
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 52 |
2 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..52172efb02d7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = emdl + pkgdesc = Extensible manga downloader and reader using Electron + pkgver = 2.0.1 + pkgrel = 1 + url = https://gitlab.com/CopyNippyJoin/emdl + arch = x86_64 + license = GPL3 + makedepends = git + makedepends = nvm + depends = electron + depends = jq + depends = npm + source = https://gitlab.com/CopyNippyJoin/emdl/-/archive/v2.0.1/emdl-v2.0.1.tar.gz + sha256sums = b4a3d6f612815ac2e248beffae7deed3d4454bc4692f90a15229cd615fbd54fd + +pkgname = emdl + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ee3f71577d70 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Timur Demin <me@tdem.in> + +# Ported from insomnia-src pkgbuild, thanks to @vscncls and @bruceutut + +pkgname="emdl" +pkgver="2.0.1" +pkgrel=1 +pkgdesc='Extensible manga downloader and reader using Electron' + +_pkgarchive="$pkgname-v$pkgver" + +url="https://gitlab.com/CopyNippyJoin/emdl" +arch=('x86_64') +license=('GPL3') +depends=( + 'electron' + 'jq' + 'npm' +) +makedepends=( + 'git' + 'nvm' +) +source=("https://gitlab.com/CopyNippyJoin/$pkgname/-/archive/v$pkgver/$_pkgarchive.tar.gz") +sha256sums=('b4a3d6f612815ac2e248beffae7deed3d4454bc4692f90a15229cd615fbd54fd') + +build () { + # Use node 12 + local node_version='12' + export npm_config_cache="$srcdir/$_pkgarchive/npm_cache" + local npm_prefix=$(npm config get prefix) + npm config delete prefix + source /usr/share/nvm/init-nvm.sh + nvm install "$node_version" && nvm use "$node_version" + # Run the build + cd "$srcdir/$_pkgarchive" + npm ci + npm run pack + # Restore node config + npm config set prefix "$npm_prefix" + nvm unalias default +} + +package () { + # Set up package directories + install -d ${pkgdir}/{opt,usr/bin} + # Copy built files into the package + find $srcdir/$_pkgarchive/dist/linux-unpacked -type f \ + -exec install -Dm 755 "{}" "$pkgdir/opt/$pkgname/{}" \; + # Symlink the executable path into the package + ln -s /opt/$pkgname/$pkgname $pkgdir/usr/bin/$pkgname +} |