From 4f9993dc9bc27e9dd63846418c4a024f9c99fc55 Mon Sep 17 00:00:00 2001 From: James An Date: Sun, 10 Jul 2016 17:55:02 -0400 Subject: [PATCH] Initial commit with working spec. --- .SRCINFO | 16 ++++++++++++++++ .gitignore | 27 +++++++++++++++++++++++++++ PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ make-destdir.patch | 24 ++++++++++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 .SRCINFO create mode 100644 .gitignore create mode 100644 PKGBUILD create mode 100644 make-destdir.patch diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..65b9824 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = git-subrepo-git + pkgdesc = Git command is an improvement from git-submodule and git-subtree. + pkgver = 0.3.0.r72.g1e79595 + pkgrel = 1 + url = https://github.com/ingydotnet/git-subrepo + arch = any + license = GPL + provides = git-subrepo=0.3.0.r72.g1e79595 + conflicts = git-subrepo + source = git-subrepo::git+https://github.com/ingydotnet/git-subrepo.git + source = make-destdir.patch + md5sums = SKIP + md5sums = ee9d7137bb4fe4b0cc7da8f669e26ddf + +pkgname = git-subrepo-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..43316bc --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +# From: https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore + +*.tar +*.tar.* +*.zip +*.tgz +*.log +*.log.* +*.sig + +# makepkg working folders +pkg +src + +# +# Additional ignore patterns: +# + +# Source files +*.deb +*.gem +*.out +*.rpm +*.html + +# Ignore package source folders +*/* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..e6a42dd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: James An + +pkgname=git-subrepo-git +_pkgname=${pkgname%-git} +pkgver=0.3.0.r72.g1e79595 +pkgrel=1 +pkgdesc="Git command is an improvement from git-submodule and git-subtree." +arch=('any') +url="https://github.com/ingydotnet/$_pkgname" +license=('GPL') +provides=("$_pkgname=$pkgver") +conflicts=("$_pkgname") +source=("$_pkgname"::"git+$url.git" + make-destdir.patch) +md5sums=('SKIP' + 'ee9d7137bb4fe4b0cc7da8f669e26ddf') + +pkgver() { + cd "$_pkgname" + ( + set -o pipefail + git describe --long --tag | sed -r 's/([^-]*-g)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +prepare() { + cd "$_pkgname" + + patch -p1 < ../make-destdir.patch +} + +check() { + cd "$_pkgname" + + make test +} + +package() { + cd "$_pkgname" + + make DESTDIR="$pkgdir" PREFIX=/usr install +} diff --git a/make-destdir.patch b/make-destdir.patch new file mode 100644 index 0000000..3109f86 --- /dev/null +++ b/make-destdir.patch @@ -0,0 +1,24 @@ +diff --git a/Makefile b/Makefile +index 1239b9f..764bd65 100644 +--- a/Makefile ++++ b/Makefile +@@ -15,9 +15,9 @@ SHARE = share + + # Install variables: + PREFIX ?= /usr/local +-INSTALL_LIB ?= $(shell git --exec-path) ++INSTALL_LIB ?= $(DESTDIR)$(shell git --exec-path) + INSTALL_EXT ?= $(INSTALL_LIB)/$(NAME).d +-INSTALL_MAN1 ?= $(PREFIX)/share/man/man1 ++INSTALL_MAN1 ?= $(DESTDIR)$(PREFIX)/share/man/man1 + + # Basic targets: + default: help +@@ -36,6 +36,7 @@ test: + + # Install support: + install: ++ install -C -d -m 0755 $(INSTALL_LIB)/ + install -C -m 0755 $(LIB) $(INSTALL_LIB)/ + install -C -d -m 0755 $(INSTALL_EXT)/ + install -C -m 0755 $(EXTS) $(INSTALL_EXT)/