summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorNik Rozman2022-01-22 14:59:54 +0100
committerNik Rozman2022-01-22 14:59:54 +0100
commit7eb2a112dd4d30dd2d9a9a9e18804185a4a0d5e8 (patch)
treed7d435d0507027c719ccf79c81403d9931319fd6
parent5e7024ba94e304e2b23bf6c4bf49349e15870df7 (diff)
downloadaur-7eb2a112dd4d30dd2d9a9a9e18804185a4a0d5e8.tar.gz
Initial commit
-rw-r--r--PKGBUILD114
-rw-r--r--windscribe-bin.install52
2 files changed, 84 insertions, 82 deletions
diff --git a/PKGBUILD b/PKGBUILD
index e21a86c2f396..7b2682e26de4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,89 +1,39 @@
-# Maintainer Seva Alekseyev <sevaa@yarxi.ru>
-# Maintainer Stoyan Minaev <stoyan.minaev@gmail.com>
+# Maintainer: Nik Rozman <admin[at]piskot[dot]si>
+# Maintainer: Windscribe Limited <hello[at]windscribe[dot]com>
+# Contributor: Nik Rozman <admin[at]piskot[dot]si>
+# Contributor: Windscribe Limited <hello[at]windscribe[dot]com>
-pkgbase=pkgbase
-pkgname=yarxi
-pkgver=1.10
+pkgname=windscribe-bin
+pkgver=2.3.15
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"
-)
+pkgdesc="Windscribe Client"
arch=('x86_64')
-_md5sums=(
- '812d2265816ed781751c5c0eb6664d91'
- 'b243ada8569b2b3d4586dc4178fd8d56'
- '797e351a57c9d56368f710e7cba40f21'
- 'b3cff12767e21d3a76794046557d3df0'
-)
-depends=(
- ttf-sazanami nas
-)
+url="https://windscribe.com/download"
+license=('GPL2')
+depends=('nftables' 'c-ares' 'qt5-svg' 'freetype2' 'hicolor-icon-theme' 'curl')
+conflicts=('windscribe-cli')
+provides=('windscribe')
+options=('!strip' '!emptydirs')
+install=${pkgname}.install
+source=("https://windscribe.com/install/desktop/linux_deb_x64/beta")
+sha512sums=('SKIP')
-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
-}
+package(){
+ # Extract package data
+ tar xf data.tar.xz -C "${pkgdir}"
-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
-}
+ # Correct permissions
+ chmod -R 755 "${pkgdir}"
-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/
-}
+ # Point files to the correct location
+ sed -i 's_/usr/local/windscribe_/opt/windscribe_g' ${pkgdir}/usr/share/applications/windscribe.desktop
+ sed -i 's_/usr/local/windscribe_/opt/windscribe_g' ${pkgdir}/etc/systemd/system/windscribe-helper.service
+ sed -i 's_/usr/local/windscribe_/opt/windscribe_g' ${pkgdir}/usr/polkit-1/actions/com.windscribe.authhelper.policy
-#vim: syntax=sh
+ # Move files to correct location
+ mkdir -p "${pkgdir}/opt/windscribe"
+ mv "${pkgdir}/usr/local/windscribe" "${pkgdir}/opt/"
+
+ # Install license
+ install -D -m644 "${pkgdir}/opt/windscribe/open_source_licenses.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+} \ No newline at end of file
diff --git a/windscribe-bin.install b/windscribe-bin.install
new file mode 100644
index 000000000000..252f0fa51bb3
--- /dev/null
+++ b/windscribe-bin.install
@@ -0,0 +1,52 @@
+pre_install() {
+
+ end=$((SECONDS+10))
+
+ while :
+ do
+ if [ -z "$(ps -eo args | grep WindscribeEngine | grep -v grep)" ]; then
+ break
+ fi
+
+ if [ $SECONDS -gt $end ]; then
+ echo 'Error during Windscribe installation. WindscribeEngine is running. Please re-launch Windscribe. And try to update again.'
+ exit 1
+ fi
+ done
+
+ systemctl stop windscribe-helper > /dev/null 2>&1
+ systemctl disable windscribe-helper > /dev/null 2>&1
+
+ # Stop and disable firewalld service if it is active, otherwise it will conflict with iptables on OS reboot
+ # Relevant for Fedora distributions
+ systemctl is-active --quiet firewalld
+ if [ $? -eq 0 ]
+ then
+ echo "Firewalld service is running. It will be stopped and disabled to avoid conflicts with the Windscribe iptables firewall."
+ sudo systemctl stop firewalld
+ sudo systemctl disable firewalld
+ fi
+
+ echo "Finish pre-install script"
+}
+
+post_install() {
+ systemctl enable windscribe-helper
+ systemctl start windscribe-helper
+
+}
+
+pre_upgrade() {
+ set -e
+ systemctl stop windscribe-helper
+ systemctl disable windscribe-helper
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ systemctl stop windscribe-helper
+ systemctl disable windscribe-helper
+}