File: post

package info (click to toggle)
pypi2deb 1.20160809
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 188 kB
  • ctags: 56
  • sloc: python: 1,011; sh: 29; makefile: 19
file content (40 lines) | stat: -rwxr-xr-x 1,099 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
#! /bin/sh

set -e

NAME=$1
VERSION=$2
REVISION=$3
TARBALL=`find .. -maxdepth 1 -type f -name "${NAME}_${VERSION}.orig.tar.*" -printf %f -quit`

# do nothing if .git directory exists
test \! -d .git || exit 0
# make sure git-dpm is installed
test -x /usr/bin/git-dpm  || (echo 'E: please install git-dpm package' >&2; exit 1)

git init
git remote add origin ssh://git.debian.org/git/python-modules/packages/${NAME}.git
echo debian > .git/info/exclude
git add .
git commit -m "import ${TARBALL}"
git checkout -b upstream
pristine-tar commit ../${TARBALL} upstream

git-dpm init ../${TARBALL}
rm .git/info/exclude
git add debian/*
cat << EOF >> debian/.git-dpm
debianTag="debian/%e%v"
patchedTag="patched/%e%v"
upstreamTag="upstream/%e%u"
EOF
git commit -a -m 'add initial Debian packaging'

git-dpm prepare
git-dpm status

echo "I: to create repository on git.debian.org:"
echo "   ssh git.debian.org -c 'cd /git/python-modules && ./setup-repository ${NAME} \"${NAME} packaging\"'"

echo "I: to push (after reviewing all files) changes to DPMT's repo:"
echo "   git push --set-upstream origin --all"