diff options
author | EdvinAlvarado | 2021-06-26 17:10:13 -0700 |
---|---|---|
committer | EdvinAlvarado | 2021-06-26 17:10:13 -0700 |
commit | ac8ac1b026f8357c492115319ffc98c05d0365a8 (patch) | |
tree | b5107bb7878fad3645b3d0e4c10887155ab27976 | |
download | aur-ac8ac1b026f8357c492115319ffc98c05d0365a8.tar.gz |
uploading package for the first time
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 52 | ||||
-rw-r--r-- | nanominer.install | 14 |
3 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..555fbe2714bb --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = nanominer + pkgdesc = nanopool mining software + pkgver = 3.3.5 + pkgrel = 1 + url = https://github.com/nanopool/nanominer/releases + install = nanominer.install + arch = any + license = custom:nanopool + source = https://github.com/nanopool/nanominer/releases/download/3.3.5/nanominer-linux-3.3.5.tar.gz + source = https://github.com/nanopool/nanominer/raw/master/Terms%20of%20Use%20Nanominer.pdf + sha256sums = dff2c008b0571e28db46ff63ff4bf057401737c2332a31bae41e7e7bf6ab56b2 + sha256sums = SKIP + +pkgname = nanominer diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2adb37ca2b75 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,52 @@ +# Maintainer: Edvin Alvarado <ealvarado301 g-mail> +pkgname=nanominer +pkgver=3.3.5 +pkgrel=1 +pkgdesc="nanopool mining software" +arch=('any') +license=('custom:nanopool') +install=$pkgname.install +url='https://github.com/nanopool/nanominer/releases' +sha256sums=("dff2c008b0571e28db46ff63ff4bf057401737c2332a31bae41e7e7bf6ab56b2" + "SKIP") + +prepare() { + cd $pkgname-linux-$pkgver + + # saves config files in config_examples + mkdir -p config_examples + for FILE in config*.ini + do + cp -R $FILE ./config_examples/$FILE + done + + # Avoids erasing existing config files to avoid erasing any user settings + for FILE in $pkgdir/opt/$pkgname/config*.ini + do + FILENAME=${FILE##*/} + for SRCFILE in config*.ini + do + if [ $FILENAME==$SRCFILE ] + then + rm $SRCFILE + fi + done + done +} + +source=("https://github.com/nanopool/$pkgname/releases/download/$pkgver/$pkgname-linux-$pkgver.tar.gz" + "https://github.com/nanopool/$pkgname/raw/master/Terms%20of%20Use%20Nanominer.pdf") + +package() { + + # Launcher + echo -e "#\!/bin/bash\ncd /opt/nanominer\nexec /opt/$pkgname/nanominer $*" > nanominer.sh + install -Dm755 nanominer.sh "$pkgdir"/usr/bin/nanominer + + # License + install -Dm644 Terms%20of%20Use%20Nanominer.pdf "$pkgdir"/usr/share/licenses/"$pkgname"/TOU_Nanominer.pdf + + mkdir -p $pkgdir/opt/"$pkgname" + cp -R "$pkgname-linux-$pkgver"/* $pkgdir/opt/"$pkgname" +} + diff --git a/nanominer.install b/nanominer.install new file mode 100644 index 000000000000..a7cdc4032132 --- /dev/null +++ b/nanominer.install @@ -0,0 +1,14 @@ +post_install () { + echo "existing config*.ini files are maintained." + echo "If no existing config*.ini exists, it will include the src file ones." + echo "Remember to change the address in the config files to yours" + echo "find examples in /opt/nanominer/config_examples/" +} + +post_upgrade() { + echo "Your config files should still be there" +} + +post_remove() { + echo "config files are not removed from /opt/nanominer/" +} |