Browse Source

Initial commit with working spec.

master
James An 5 years ago
commit
4f9993dc9b
  1. 16
      .SRCINFO
  2. 27
      .gitignore
  3. 43
      PKGBUILD
  4. 24
      make-destdir.patch

16
.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

27
.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
*/*

43
PKGBUILD

@ -0,0 +1,43 @@
# Maintainer: James An <james@jamesan.ca>
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
}

24
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)/
Loading…
Cancel
Save