File: build

package info (click to toggle)
git-hub 2.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 312 kB
  • sloc: python: 1,680; sh: 133; makefile: 56
file content (43 lines) | stat: -rwxr-xr-x 1,199 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/sh
set -e

cd `dirname $0`

genchangelog()
{
        echo "$1 ($2) `lsb_release -sc`; urgency=low"
        echo
	prevtag=$(git describe --abbrev=0 HEAD^)
        git log --date=short --format="  * %s (%h, %cd)" "$prevtag"..HEAD |
                fold --spaces --width 76 | sed 's/^\([^ ]\+\)/    \1/'
        echo
        echo " -- $3  `LANG=C date -R`"
}

pkgversion=$(git describe --dirty | cut -c2- |
		sed 's/-\([0-9]\+\)-\(g[0-9a-f]\+\)/+\1~\2/' |
		sed 's/\(~g[0-9a-f]\+\)-dirty$/-dirty\1/' |
		sed 's/-dirty/~dirty.'`date +%Y%m%d%H%M%S`'/'
	)-$(lsb_release -cs)

pkgmaint=$(echo "`git config user.name` <`git config user.email`>")

changelog=`mktemp`
trap "rm -f '$changelog'; exit 1" INT TERM QUIT

pkgname=git-hub
genchangelog "$pkgname" "$pkgversion" "$pkgmaint" > "$changelog"
fpm -s dir -t deb -n "$pkgname" -v "$pkgversion" \
	--architecture all \
	--maintainer "$pkgmaint" \
	--description "Git command line interface to GitHub" \
	--url 'https://github.com/sociomantic-tsunami/git-hub' \
	--vendor 'dunnhumby Germany GmbH' \
	--license GPLv3 \
	--category vcs \
	--depends python3 \
	--depends "git (>=1.7.7)" \
	--deb-changelog "$changelog" \
	install/usr=/ \
	install/etc=/