summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorzimbatm2019-05-06 09:29:17 +0000
committerGitHub2019-05-06 09:29:17 +0000
commit56a58bb4914d21ccab1dacb2b7c540a61e8119cc (patch)
tree1cb061cdea902922f703e92305fdc4a4d3450284
parentcf2bb4c8d676d0ffb1a4f60a5030c9e4f9cc2c1c (diff)
parent4c8a1a44b7154cad0ba87611aee5f93c4149e16f (diff)
downloadaur-56a58bb4914d21ccab1dacb2b7c540a61e8119cc.tar.gz
Merge pull request #13 from PanisSupraOmnia/small-improvements
Overall improvements
-rw-r--r--.SRCINFO2
-rw-r--r--.gitignore3
-rw-r--r--Dockerfile4
-rw-r--r--PKGBUILD26
-rw-r--r--README.md29
-rwxr-xr-xdocker-mksrcinfo8
-rwxr-xr-xdocker-srcinfo8
-rwxr-xr-xupdate10
8 files changed, 46 insertions, 44 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2e526ad2989..35b965476a2 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -2,7 +2,7 @@ pkgbase = direnv
pkgdesc = a shell extension that manages your environment
pkgver = 2.20.1
pkgrel = 2
- url = http://direnv.net
+ url = https://direnv.net
arch = x86_64
arch = i686
arch = armv7h
diff --git a/.gitignore b/.gitignore
index a5401c5d685..f52b2f5a994 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
pkg/
src/
-*.pkg.tar.xz
+*.tar.xz
+*.tar.gz
diff --git a/Dockerfile b/Dockerfile
index b5cf5d19815..89f55c0bad5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,5 @@
FROM archlinux/base:latest
-RUN pacman -Sy --noconfirm --needed base-devel
-
-RUN mkdir /src
+RUN pacman -Syu --noconfirm --needed base-devel pacman-contrib
WORKDIR /src
diff --git a/PKGBUILD b/PKGBUILD
index 65b24598c57..da153710fd1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,36 +1,38 @@
# Maintainer: zimbatm <zimbatm@zimbatm.com>
+# Maintainer: ShadowKyogre <shadowkyogre.public+aur@gmail.com>
+# Maintainer: rmorgans <rick.morgans@gmail.com>
pkgname=direnv
pkgver=2.20.1
pkgrel=2
pkgdesc='a shell extension that manages your environment'
arch=('x86_64' 'i686' 'armv7h')
-url='http://direnv.net'
+url='https://direnv.net'
license=('MIT')
makedepends=('go')
source=("$pkgname-$pkgver.tar.gz::https://github.com/direnv/direnv/archive/v$pkgver.tar.gz")
+sha256sums=('dd54393661602bb989ee880f14c41f7a7b47a153777999509127459edae52e47')
-gopackagepath=github.com/direnv/direnv
+_gopackagepath=github.com/direnv/direnv
prepare() {
[[ -f /etc/profile.d/go.sh ]] && source /etc/profile.d/go.sh
- export GOPATH=$srcdir/go
+ export GOPATH="$srcdir/go"
- mkdir -p "$GOPATH/src/$(dirname "$gopackagepath")"
- mv "$srcdir/$pkgname-$pkgver" "$GOPATH/src/$gopackagepath"
+ mkdir -p "$GOPATH/src/$(dirname "$_gopackagepath")"
+ mv "$srcdir/$pkgname-$pkgver" "$GOPATH/src/$_gopackagepath"
}
build() {
- export GOPATH=$srcdir/go
- cd "$GOPATH/src/$gopackagepath"
+ export GOPATH="$srcdir/go"
+ cd "$GOPATH/src/$_gopackagepath"
make
}
package() {
- export GOPATH=$srcdir/go
- cd "$GOPATH/src/$gopackagepath"
- make install DESTDIR=$pkgdir/usr
+ export GOPATH="$srcdir/go"
+ cd "$GOPATH/src/$_gopackagepath"
+ make install DESTDIR="$pkgdir/usr"
+ install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}
# vim:set ts=2 sw=2 et:
-
-sha256sums=('dd54393661602bb989ee880f14c41f7a7b47a153777999509127459edae52e47')
diff --git a/README.md b/README.md
index e46c5377da2..ae05efe6acd 100644
--- a/README.md
+++ b/README.md
@@ -2,44 +2,35 @@
## Package updates
-How to update the package from Arch on any system
+How to update the package from Arch on any system:
-0. Download the release tar.gz and run sha256sum on it.
-1. Edit PKGBUILD and change the `pkgver` and `sha256sums` fields.
-2. Run `mksrcinfo` (see below if you're not on Arch)
-3. Commit & push
+1. Edit the PKGBUILD and change the `pkgver` field.
+2. If you're on Arch, run `./update` and skip to the last step.
+3. If you're on a different system, use the Docker or Vagrant options below to update the checksums and .SRCINFO.
+4. Commit & push
### Docker setup
-Install [Docker](http://docker.com) then run `./docker-mksrcinfo`.
+Install [Docker](https://www.docker.com), then run `./docker-srcinfo`.
### Vagrant setup
-Install [Vagrant](http://vagrantup.com) then
+Install [Vagrant](https://www.vagrantup.com), then run the following:
```bash
# Create vagrant box
vagrant up
vagrant ssh
# Install dev dependencies
-sudo pacman -Syu
-sudo pacman -S --needed base-devel
+sudo pacman -Syu --needed base-devel pacman-contrib
cd /vagrant
-makepkg --printsrcinfo > .SRCINFO
+./update
```
## Push to multiple origins
```bash
-git clone ssh+git://aur@aur4.archlinux.org/direnv.git/ direnv-archlinux
+git clone ssh://aur@aur.archlinux.org/direnv.git direnv-archlinux
cd direnv-archlinux
git remote set-url --add github https://github.com/direnv/direnv-archlinux.git
```
-
-## Another way...
-
-```bash
-bash -c "updpkgsums && makepkg --printsrcinfo > .SRCINFO"
-git push aur
-git push github
-```
diff --git a/docker-mksrcinfo b/docker-mksrcinfo
deleted file mode 100755
index 38ff323def6..00000000000
--- a/docker-mksrcinfo
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# Runs mksrcinfo from within the container. Allows to make a release from
-# another Linux operating system using Docker.
-#
-
-id=$(docker build -q .)
-docker run -ti --rm --volume "$(pwd):/src" --user="$(id -u):$(id -g)" "$id" makepkg --printsrcinfo > .SRCINFO
diff --git a/docker-srcinfo b/docker-srcinfo
new file mode 100755
index 00000000000..b4db6e250d5
--- /dev/null
+++ b/docker-srcinfo
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# Updates .SRCINFO from within the container. Allows making a release from
+# another Linux operating system using Docker.
+#
+
+id=$(docker build -q .)
+docker run --rm --volume "$(pwd):/src" --user="$(id -u):$(id -g)" "$id" ./update
diff --git a/update b/update
new file mode 100755
index 00000000000..15f5b3ee32b
--- /dev/null
+++ b/update
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# Script with necessary update steps, regardless of system.
+#
+set -e
+
+updpkgsums
+
+echo 'Updating AUR package metadata...'
+makepkg --printsrcinfo > .SRCINFO