File: builddeb

package info (click to toggle)
libzc 0.4.3-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 872 kB
  • sloc: ansic: 7,407; sh: 327; python: 171; makefile: 99
file content (41 lines) | stat: -rwxr-xr-x 720 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
#!/bin/sh

# Simple debian package build script
# Debian package tracker: https://tracker.debian.org/pkg/libzc

set -e

D="debtest"
PN="libzc"
PV="0.4.3"
PF="${PN}-${PV}"
PE="orig.tar.gz"
A="${PN}_${PV}.${PE}"

if [ -d ${D} ]; then
    echo "${D} directory exists, cleaning up..."
    rm -rf ${D} && mkdir ${D}
else
    mkdir ${D}
fi

echo "Generating archive..."
if ! git archive --format=tar.gz --prefix=${PF}/ HEAD > ${D}/${A}; then
    echo >&2 "error generating archive"
    exit 1
fi

echo "Expanding archive..."
cd ${D}
tar xvf ${A}
cd ${PF}
cp -ra ../../debian .

echo "Creating debian package..."
debuild

# Next:
# - dput mentors ${PN}_${PV}-1_amd64.changes
# - Send RFS mail to submit@bugs.debian.org

exit 0