threads / discuss / 4077

script to create debian package

Subject: script to create debian package

## tl;dr

One message between May 5, 2006 and May 5, 2006.

replies: 0people: 1as markdown or json

Matthias Lederhofer· May 5, 2006, 20:53 UTC · lore

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

← back to recent threads