diff options
author | rany | 2020-10-29 16:16:02 +0200 |
---|---|---|
committer | rany | 2020-10-29 16:16:02 +0200 |
commit | 8287cd120842a20897f2e3f7523c775229822a49 (patch) | |
tree | 01c509c239f9c1a5770f5e2d7aca568a4f5f7f38 | |
parent | 5e7024ba94e304e2b23bf6c4bf49349e15870df7 (diff) | |
download | aur-8287cd120842a20897f2e3f7523c775229822a49.tar.gz |
initial version
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 109 | ||||
-rw-r--r-- | popura-default-config.service | 13 | ||||
-rw-r--r-- | popura.service | 21 | ||||
-rw-r--r-- | popura.sysusers | 2 | ||||
-rwxr-xr-x | update_version.sh | 53 |
6 files changed, 138 insertions, 89 deletions
@@ -1,12 +1,25 @@ -pkgbase = pkgbase - pkgdesc = Japanese-Russian kanji and word dictionary - pkgver = 1.10 +pkgbase = popura-git + pkgdesc = Popura ポプラ: alternative Yggdrasil network client + pkgver = 0.3.15+popura1 pkgrel = 1 - url = http://www.susi.ru/yarxi/ + url = https://github.com/popura-network/Popura + arch = i686 arch = x86_64 - license = custom - depends = ttf-sazanami - depends = nas + arch = armv7h + arch = armv6h + arch = aarch64 + license = LGPLv3 + makedepends = git + makedepends = go + conflicts = popura + source = popura::git+https://github.com/popura-network/Popura.git#commit=42941caaf13472f1ecc0c675ae6059a857f3e60a + source = popura.sysusers + source = popura-default-config.service + source = popura.service + sha512sums = SKIP + sha512sums = af276973744e079e6892d8ecdf2027ea265a05908f624f82da35d5bcc77a91ddeb458c4c3d07341aae42f003189201d3989cce5f87e184e472c1a23112cfe554 + sha512sums = 449da220d0e7f502268adb302a2672315e37dc0a08a7923727eec6eb9f49fdc803ac0240508e62920edd826c6d294cec238485edebb5250228fa35eb20e544fb + sha512sums = c6fbc97bb7c372e6d6094a6826fdc03306ed7ba67bb7303567ad5d650dee34eead803c03bcf39a6a836b149fafbef5462d756aae3c1099ddaba6eb7b446e3274 -pkgname = yarxi +pkgname = popura-git @@ -1,89 +1,36 @@ -# Maintainer Seva Alekseyev <sevaa@yarxi.ru> -# Maintainer Stoyan Minaev <stoyan.minaev@gmail.com> +# Maintainer: rany <rany at i2pmail dot org> -pkgbase=pkgbase -pkgname=yarxi -pkgver=1.10 +pkgname=popura-git +_pkgname="popura" +pkgver=0.3.15+popura1 +_commit=42941caaf13472f1ecc0c675ae6059a857f3e60a pkgrel=1 -pkgdesc="Japanese-Russian kanji and word dictionary" -url="http://www.susi.ru/yarxi/" -license=('custom') -_source=( - "http://www.susi.ru/yarxi/yarxi_${pkgver}-${pkgrel}_amd64.deb" - "http://ftp.uk.debian.org/debian/pool/main/q/qt4-x11/libqtcore4_4.8.7+dfsg-11_amd64.deb" - "http://ftp.uk.debian.org/debian/pool/main/q/qt4-x11/libqtgui4_4.8.7+dfsg-11_amd64.deb" - "http://ftp.uk.debian.org/debian/pool/main/q/qt4-x11/libqt4-network_4.8.7+dfsg-11_amd64.deb" -) -arch=('x86_64') -_md5sums=( - '812d2265816ed781751c5c0eb6664d91' - 'b243ada8569b2b3d4586dc4178fd8d56' - '797e351a57c9d56368f710e7cba40f21' - 'b3cff12767e21d3a76794046557d3df0' -) -depends=( - ttf-sazanami nas -) - -prepare() { - cd $srcdir/ - echo "Due to 'makepkg' and 'PKGBUILD' specs limitations I need to dowanload sources and validate them by myself" - for source_url in ${_source[@]}; do - source_filename=${source_url##*/} - if [ ! -f "$source_filename" ]; then - echo "Downloading next source - $source_filename ..." - curl -A DUMMY -O "$source_url"; - else - echo "Found already downloaded source - $source_filename" - fi - done - echo "And now we must validated dowanloaded sources ..." - for (( i=0; i<${#_source[@]}; ++i )); do - source_url=${_source[i]} - source_filename=${source_url##*/} - source_expected_md5sum=${_md5sums[i]} - source_actual_md5sum=$(md5sum $source_filename | awk '{print $1}') - if [ "$source_actual_md5sum" == "$source_expected_md5sum" ]; then - echo "Validated next source - $source_filename" - else - echo "Found corrupted source - $source_filename"; return 1 - fi - done -} +pkgdesc="Popura ポプラ: alternative Yggdrasil network client" +arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64') +url="https://github.com/popura-network/Popura" +license=('LGPLv3') +conflicts=('popura') +makedepends=('git' 'go') +source=("popura::git+https://github.com/popura-network/Popura.git#commit=${_commit}" + 'popura.sysusers' + 'popura-default-config.service' + 'popura.service') +sha512sums=('SKIP' + 'af276973744e079e6892d8ecdf2027ea265a05908f624f82da35d5bcc77a91ddeb458c4c3d07341aae42f003189201d3989cce5f87e184e472c1a23112cfe554' + '449da220d0e7f502268adb302a2672315e37dc0a08a7923727eec6eb9f49fdc803ac0240508e62920edd826c6d294cec238485edebb5250228fa35eb20e544fb' + 'c6fbc97bb7c372e6d6094a6826fdc03306ed7ba67bb7303567ad5d650dee34eead803c03bcf39a6a836b149fafbef5462d756aae3c1099ddaba6eb7b446e3274') build() { - cd $srcdir/ - mkdir -p deb/{$pkgname,qt4core,qt4gui,qt4network} - bsdtar xf yarxi_${pkgver}-${pkgrel}_amd64.deb -C deb/$pkgname/ - bsdtar xf libqtcore4_4.8.7+dfsg-11_amd64.deb -C deb/qt4core/ - bsdtar xf libqtgui4_4.8.7+dfsg-11_amd64.deb -C deb/qt4gui/ - bsdtar xf libqt4-network_4.8.7+dfsg-11_amd64.deb -C deb/qt4network/ - for dir in deb/$pkgname deb/qt4core deb/qt4gui deb/qt4network; do - cd $dir; tar xf data.tar.*; cd $srcdir - done + cd "${srcdir}/${_pkgname}" + ./build } package() { - cd $srcdir/ - mkdir -p $pkgdir/usr/lib/ - mkdir -p $pkgdir/usr/bin/ - mkdir -p $pkgdir/usr/share/ - mkdir -p $pkgdir/usr/share/applications/ - mkdir -p $pkgdir/usr/share/doc/$pkgname/ - mkdir -p $pkgdir/usr/share/icons/hicolor/{16x16/apps,32x32/apps,48x48/apps}/ - mkdir -p $pkgdir/usr/share/pixmaps/ - mkdir -p $pkgdir/usr/share/$pkgname/ - install -m 0755 $srcdir/deb/$pkgname/usr/bin/$pkgname $pkgdir/usr/bin/$pkgname - install -m 0755 $srcdir/deb/qt4core/usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.7 $pkgdir/usr/lib/libQtCore.so.4 - install -m 0755 $srcdir/deb/qt4gui/usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.7 $pkgdir/usr/lib/libQtGui.so.4 - install -m 0755 $srcdir/deb/qt4network/usr/lib/x86_64-linux-gnu/libQtNetwork.so.4.8.7 $pkgdir/usr/lib/libQtNetwork.so.4 - install -m 0644 $srcdir/deb/$pkgname/usr/share/applications/seva-yarxi.desktop $pkgdir/usr/share/applications/ - install -m 0644 $srcdir/deb/$pkgname/usr/share/doc/$pkgname/copyright $pkgdir/usr/share/doc/$pkgname/ - for icons in 16x16 32x32 48x48; do - install -m 0644 $srcdir/deb/$pkgname/usr/share/icons/hicolor/$icons/apps/seva-yarxi.png $pkgdir/usr/share/icons/hicolor/$icons/apps/ - done - install -m 0644 $srcdir/deb/$pkgname/usr/share/pixmaps/*.xpm $pkgdir/usr/share/pixmaps/ - install -m 0644 $srcdir/deb/$pkgname/usr/share/$pkgname/yarxice.db $pkgdir/usr/share/$pkgname/ + cd "${srcdir}/${_pkgname}" + install -Dm755 "yggdrasil" "${pkgdir}/usr/bin/popura" + install -Dm755 "yggdrasilctl" "${pkgdir}/usr/bin/popuractl" + install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}" + install -Dm644 "${srcdir}/popura.sysusers" "${pkgdir}/usr/lib/sysusers.d/popura.conf" + install -Dm644 "${srcdir}/popura.service" -t "${pkgdir}/usr/lib/systemd/system" + install -Dm644 "${srcdir}/popura-default-config.service" -t "${pkgdir}/usr/lib/systemd/system" } - -#vim: syntax=sh diff --git a/popura-default-config.service b/popura-default-config.service new file mode 100644 index 000000000000..e9aad1432611 --- /dev/null +++ b/popura-default-config.service @@ -0,0 +1,13 @@ +[Unit] +Description=popura default config generator +ConditionPathExists=|!/etc/popura.conf +ConditionFileNotEmpty=|!/etc/popura.conf +Wants=local-fs.target +After=local-fs.target + +[Service] +Type=oneshot +Group=popura +StandardOutput=file:/etc/popura.conf +ExecStart=/usr/bin/popura -genconf +ExecStartPost=/usr/bin/chmod 0640 /etc/popura.conf diff --git a/popura.service b/popura.service new file mode 100644 index 000000000000..c793acf3c47e --- /dev/null +++ b/popura.service @@ -0,0 +1,21 @@ +[Unit] +Description=popura +Wants=network.target +Wants=popura-default-config.service +After=network.target +After=popura-default-config.service + +[Service] +Group=popura +ProtectHome=true +ProtectSystem=true +SyslogIdentifier=popura +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW +ExecStartPre=+-/sbin/modprobe tun +ExecStart=/usr/bin/popura -useconffile /etc/popura.conf +ExecReload=/bin/kill -HUP $MAINPID +Restart=always +TimeoutStopSec=5 + +[Install] +WantedBy=multi-user.target diff --git a/popura.sysusers b/popura.sysusers new file mode 100644 index 000000000000..41d36aa6e147 --- /dev/null +++ b/popura.sysusers @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +g popura - - diff --git a/update_version.sh b/update_version.sh new file mode 100755 index 000000000000..c643a8d1cfcf --- /dev/null +++ b/update_version.sh @@ -0,0 +1,53 @@ +#!/bin/bash +set -euxo pipefail + +REPO="https://github.com/yggdrasil-network/yggdrasil-go.git" +WORKDIR="/tmp/yggdrasil-go" + +# Set up cleanup +function cleanup() { + rm -rf ${WORKDIR} +} +trap cleanup EXIT + +# Check out latest master +git clone ${REPO} ${WORKDIR} + +# Fetch version information +pushd ${WORKDIR} +git checkout develop + +VER=$(git describe --tags --long --always) +VER=${VER/-/.r} +VER=${VER/-/.} +VER=${VER#v} + +COMMIT=$(git rev-parse HEAD) + +# Replace version in PKGBUILD +popd +sed -i \ + -e "s/^pkgver=.*$/pkgver=${VER}/" \ + -e "s/^_commit=.*$/_commit=${COMMIT}/" \ + PKGBUILD + +# Check for real updates +if (git diff --exit-code PKGBUILD); then + echo "Version ${VER} is already in PKGBUILD, not updating" + exit 0 +fi + +# Reset pkgrel +sed -i \ + -e 's/pkgrel=.*/pkgrel=1/' \ + PKGBUILD + +# Update source hashes +updpkgsums + +# Update .SRCINFO +makepkg --printsrcinfo >.SRCINFO + +# Create update-commit +git add PKGBUILD .SRCINFO +git commit -m "yggdrasil-go v${VER}" |