-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
deb2itp
executable file
·44 lines (38 loc) · 1.34 KB
/
deb2itp
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
42
43
44
#!/bin/bash
# usually when you want to package something officially for debian
# you file an ITP: bug so others don't do the same, this will prepare
# the mail for copy pasta after you already packaged it.
if [ -d debian ]; then
cd debian
fi
for a in changelog rules control copyright; do
if [ ! -f $a ]; then
echo "No debian/$a found"
exit 1
fi
done
if [ "${DEBFULLNAME}x" = x ]; then
echo "WARNING: '\$DEBFULLNAME' not set"
fi
if [ "${DEBEMAIL}x" = x ]; then
echo "WARNING: '\$DEBEMAIL' not set"
fi
pkg=$(head -1 control|awk '{print $2}')
shortdesc=$(grep ^Description: control|head -1|awk '{$1="";print}')
ver=$(head -1 changelog|awk '{print $2}' |sed 's,(,,g;s,\(.*\)-[^/]*,\1,g')
auth=$(grep ^Upstream-Contact copyright | head -1|awk '{$1="";print}')
url=$(grep ^Homepage: control | head -1|awk '{$1="";print}')
lic=$(grep ^License: copyright | head -1|awk '{$1="";print}')
echo "submit@bugs.debian.org"
echo "ITP: $pkg --$shortdesc"
echo -e 'Package: wnpp\nSeverity: wishlist'
echo "Owner: $DEBFULLNAME <${DEBEMAIL}>"
echo "X-Debbugs-Cc: debian-devel@lists.debian.org"
echo
echo "* Package name : $pkg"
echo " Version : $ver"
echo " Upstream Authors:$auth"
echo " URL :$url"
echo "* License :$lic"
echo " Description :$shortdesc"
sed -n '/Description:.*$/,/^$/p' control |sed 1d | sed -n '/^$/,//!p'