Skip to contentSkip to conversation

script to create debian package

DISCUSSION Matthias Lederhofer 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I wrote a script similar to the script in scripts/package/builddeb in the kernel tree for git. Is there any interest to integrate it into the git source tree? I've attached the script.

#!/bin/sh
tmpdir="pwd/debian/tmp"

make prefix=/usr all doc
make prefix="$tmpdir/usr" install install-doc

version="cat GIT-VERSION-FILE | cut -d ' ' -f 3" name="git debian package script <id -nu@hostname -f>"

mkdir -p "$tmpdir/DEBIAN"

cat <<EOF > debian/control
Source: git
Section: devel
Priority: optional
Maintainer: $name
Standards-Version: 3.6.1

Package: git
Conflicts: git-arch, git-core, git-cvs, git-doc, git-email, git-svn, gitk
Provides: git-arch, git-core, git-cvs, git-doc, git-email, git-svn, gitk
Architecture: any
Description: git, version $version
This package contains git version $version.
EOF

cat <<EOF > debian/changelog
git ($version-1) unstable; urgency=low

* A standard release

-- $name date -R
EOF

chmod -R og-w debian/tmp
dpkg-gencontrol -isp
fakeroot dpkg --build "$tmpdir" ..