diff options
author | fzerorubigd | 2015-06-08 20:04:41 +0430 |
---|---|---|
committer | fzerorubigd | 2015-06-08 20:04:41 +0430 |
commit | 6522bc62fcf9be31ad9024b528dfabeebf49edda (patch) | |
tree | a4e4c2346d4097a59ac1e57322a41f0755fd008c | |
download | aur-6522bc62fcf9be31ad9024b528dfabeebf49edda.tar.gz |
migrate to aur4
-rw-r--r-- | .SRCINFO | 25 | ||||
-rw-r--r-- | .gitignore | 11 | ||||
-rw-r--r-- | PKGBUILD | 42 | ||||
-rw-r--r-- | cow-proxy-git.install | 51 | ||||
-rw-r--r-- | cow@.service | 11 | ||||
-rw-r--r-- | cow_user.service | 10 |
6 files changed, 150 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f5445ea00f23 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,25 @@ +pkgbase = cow-proxy-git + pkgdesc = HTTP proxy written in Go. COW can automatically identify blocked sites and use parent proxies to access + pkgver = 1012.b465963 + pkgrel = 1 + url = https://github.com/cyfdecyf/cow + install = cow-proxy-git.install + arch = i686 + arch = x86_64 + arch = armv5tel + arch = armv6l + arch = armv71 + license = custom + makedepends = go + makedepends = mercurial + makedepends = git + conflicts = cow-proxy + source = cow@.service + source = cow_user.service + source = git://github.com/cyfdecyf/cow.git + sha1sums = 3efa6f55e51bed4043ac7a5804469bdd38032359 + sha1sums = ee250fdebc73255effd6219d0d8089990c9c73bd + sha1sums = SKIP + +pkgname = cow-proxy-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0045cadbfc4a --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +*.xz +*.zip +*.deb +*.tar.gz +*.tar.gz.asc +*.tgz +*.bz2 +/pkg +/src +*.gz +rc diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..625ffef4be57 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: FzerorubigD <Fzerorubigd {AT} GMail {DOT} com> +pkgname=cow-proxy-git +pkgver=1051.7f8245a +pkgrel=1 +pkgdesc="HTTP proxy written in Go. COW can automatically identify blocked sites and use parent proxies to access" +arch=('i686' 'x86_64' 'armv5tel' 'armv6l' 'armv71') +url="https://github.com/cyfdecyf/cow" +license=('custom') +depends=() +makedepends=('go' 'mercurial' 'git') +source=('cow@.service' + 'cow_user.service' + 'git://github.com/cyfdecyf/cow.git') + +sha1sums=('3efa6f55e51bed4043ac7a5804469bdd38032359' + 'ee250fdebc73255effd6219d0d8089990c9c73bd' + 'SKIP') + +conflicts=(cow-proxy) + +_gitname=cow +install=$pkgname.install + +pkgver() { + cd "${srcdir}/${_gitname}" + echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" +} + +build() { + mkdir -p ${srcdir}/src/github.com/cyfdecyf/cow + cd "${srcdir}/${_gitname}" + git --work-tree=${srcdir}/src/github.com/cyfdecyf/cow checkout -f develop + cd ${srcdir}/src/github.com/cyfdecyf/cow + GOPATH=${srcdir} go get -v +} + +package() { + mkdir -p $pkgdir/usr/bin + install -m755 $srcdir/bin/cow $pkgdir/usr/bin/cow + install -Dm644 cow@.service ${pkgdir}/usr/lib/systemd/system/cow@.service + install -Dm644 cow_user.service ${pkgdir}/usr/lib/systemd/user/cow.service +} diff --git a/cow-proxy-git.install b/cow-proxy-git.install new file mode 100644 index 000000000000..4c7fc9ae935f --- /dev/null +++ b/cow-proxy-git.install @@ -0,0 +1,51 @@ +post_install() { + +cat << EOF + The cow.service is only available for an available user + Configuration sample can be found at : https://github.com/cyfdecyf/cow/tree/master/doc/sample-config + + mkdir -p ~/.cow + wget https://raw.githubusercontent.com/cyfdecyf/cow/master/doc/sample-config/rc + + and edit listen and proxy settings. the document is in chineese :) + + for direct and block list, you can also edit ~/.cow/blocked and ~/.cow/direct +EOF +post_upgrade +} + +post_upgrade() { + +cat << EOF + + Running cow system instance for user account: + + To reload system systemd modules, execute + + systemctl daemon-reload + + To start cow, execute: + + systemctl start cow@user + + To autostart cow on system start, execute + + systemctl enable cow@user + + Running cow user instance (will used current user account): + + To reload user systemd modules, execute + + systemctl --user daemon-reload + + To start cow manually, execute: + + systemctl --user start cow + + To autostart cow on user login, execute + + systemctl --user enable cow + +EOF + +} diff --git a/cow@.service b/cow@.service new file mode 100644 index 000000000000..0fdfe6802e34 --- /dev/null +++ b/cow@.service @@ -0,0 +1,11 @@ +[Unit] +Description=COW HTTP proxy service for %i +After=network.target + +[Service] +User=%i +ExecStart=/usr/bin/cow +Restart=on-abort + +[Install] +WantedBy=multi-user.target diff --git a/cow_user.service b/cow_user.service new file mode 100644 index 000000000000..fc1d32a87a84 --- /dev/null +++ b/cow_user.service @@ -0,0 +1,10 @@ +[Unit] +Description=COW HTTP proxy service per-user service +After=network.target + +[Service] +ExecStart=/usr/bin/cow +Restart=on-abort + +[Install] +WantedBy=default.target |