File: lua-create-gitbuildpackage-layout

package info (click to toggle)
dh-lua 35
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 228 kB
  • sloc: ansic: 110; perl: 93; sh: 57; makefile: 56
file content (37 lines) | stat: -rwxr-xr-x 1,151 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
#!/bin/sh
# Copyright: © 2012 Enrico Tassi <gareuselesinge@debian.org>
# License: MIT

if [ -z "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then
	echo Give as a unique argument the name of the source package
	echo that will be the name of the root directory of the package.
	exit 1
fi

PKG=$1

mkdir $PKG/
cd $PKG
git init
git remote add origin git@salsa.debian.org:lua-team/$PKG.git
[ ! -z "$DEBFULLNAME" ] && git config user.name "$DEBFULLNAME"
[ ! -z "$DEBEMAIL" ] && git config user.email "<$DEBEMAIL>"
cd ..
mkdir $PKG/debian
mkdir $PKG/debian/patches
mkdir $PKG/debian/source
mkdir $PKG/debian/tests

echo '3.0 (quilt)' > $PKG/debian/source/format
touch $PKG/debian/patches/series
cp /usr/share/dh-lua/template/dh-lua.conf $PKG/debian/
cp /usr/share/dh-lua/template/rules $PKG/debian/
cp /usr/share/dh-lua/template/copyright $PKG/debian/
cp /usr/share/dh-lua/template/control $PKG/debian/
cp /usr/share/dh-lua/template/compat $PKG/debian/
cp /usr/share/dh-lua/template/tests.control $PKG/debian/tests/control
cp /usr/share/dh-lua/template/tests.dh-lua-tests $PKG/debian/tests/dh-lua-tests
chmod a+x $PKG/debian/rules
cd $PKG
git add debian/
cd ..