diff options
author | buckket | 2016-03-30 02:12:10 +0200 |
---|---|---|
committer | buckket | 2016-03-30 02:12:10 +0200 |
commit | ea2584a7712b53b9ac6781963fecb2404f128af6 (patch) | |
tree | d73cb736206af524511a796b4d13403e38e1c3b2 | |
download | aur-ea2584a7712b53b9ac6781963fecb2404f128af6.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | htwtxt.install | 17 | ||||
-rw-r--r-- | htwtxt.patch | 12 |
4 files changed, 87 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1e0fac89d802 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = htwtxt + pkgdesc = hosted twtxt server (in Go) + pkgver = 1.0.6 + pkgrel = 1 + url = https://github.com/plomlompom/htwtxt + install = htwtxt.install + arch = x86_64 + arch = i686 + license = AGPL + makedepends = go + makedepends = git + depends = glibc + options = !strip + options = !emptydirs + source = https://github.com/plomlompom/htwtxt/archive/1.0.6.tar.gz + source = htwtxt.patch + sha256sums = 33f93146b93b33ee6946e9aae3a3df137ab7e7a912f0008a03e88d42072a847a + sha256sums = dfc87ef17977d28e490a59312b2a772f30aa57a07ad2106d3ff2a8319714e827 + +pkgname = htwtxt + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..aa720b0e6723 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: buckket <buckket@cock.li> + +pkgname=htwtxt +pkgver=1.0.6 +pkgrel=1 +pkgdesc="hosted twtxt server (in Go)" +arch=("x86_64" "i686") +license=("AGPL") +url="https://github.com/plomlompom/htwtxt" +depends=("glibc") +makedepends=("go" "git") +options=('!strip' '!emptydirs') +install=$pkgname.install +source=("https://github.com/plomlompom/htwtxt/archive/$pkgver.tar.gz" "htwtxt.patch") +sha256sums=("33f93146b93b33ee6946e9aae3a3df137ab7e7a912f0008a03e88d42072a847a" + "dfc87ef17977d28e490a59312b2a772f30aa57a07ad2106d3ff2a8319714e827") + +prepare() { + cd $pkgname-$pkgver + patch -p1 < ../htwtxt.patch + GOPATH=`pwd` go get -d -v +} + +build() { + cd $pkgname-$pkgver + GOPATH=`pwd` go build +} + +package() { + cd $pkgname-$pkgver + + install -Dm755 "$pkgname-$pkgver" "$pkgdir/usr/bin/$pkgname" + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -dm755 "$pkgdir/usr/share/$pkgname" + cp -rf templates "$pkgdir/usr/share/$pkgname" +} + diff --git a/htwtxt.install b/htwtxt.install new file mode 100644 index 000000000000..9252e3af4db4 --- /dev/null +++ b/htwtxt.install @@ -0,0 +1,17 @@ +note() { + printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n" +} + +all_off="$(tput sgr0)" +bold="${all_off}$(tput bold)" +blue="${bold}$(tput setaf 4)" +yellow="${bold}$(tput setaf 3)" + +post_install() { + note "The htwtxt template files reside in: /usr/share/htwtxt/templates" +} + +post_upgrade() { + post_install +} + diff --git a/htwtxt.patch b/htwtxt.patch new file mode 100644 index 000000000000..148fd96b98f2 --- /dev/null +++ b/htwtxt.patch @@ -0,0 +1,12 @@ +diff -aur htwtxt-1.0.6.pristine/main.go htwtxt-1.0.6.new/main.go +--- htwtxt-1.0.6.pristine/main.go 2016-03-30 01:58:44.992331592 +0200 ++++ htwtxt-1.0.6.new/main.go 2016-03-30 02:00:25.241148111 +0200 +@@ -243,7 +243,7 @@ + flag.StringVar(&keyPath, "key", "", "SSL key file") + flag.StringVar(&certPath, "cert", "", "SSL certificate file") + flag.StringVar(&templPath, "templates", +- os.Getenv("GOPATH")+"/src/htwtxt/templates", ++ "/usr/share/htwtxt/templates", + "directory where to expect HTML templates") + flag.StringVar(&dataDir, "dir", os.Getenv("HOME")+"/htwtxt", + "directory to store feeds and login data") |