File: generate-copyright

package info (click to toggle)
redeclipse 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 6,976 kB
  • sloc: cpp: 99,295; ansic: 2,398; sh: 929; makefile: 693; objc: 361; awk: 167; sql: 102
file content (86 lines) | stat: -rwxr-xr-x 3,522 bytes parent folder | download | duplicates (3)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/bin/bash

cd "$(dirname "$0")"/..

# Header
cat <<EOF > debian/copyright-new
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Red Eclipse
Upstream-Contact: Quinton "Quin" Reeves <qreeves@gmail.com>
                  Lee "Eihrul" Salzman <lsalzman@gmail.com>
Source: https://github.com/red-eclipse/base/releases
 The following directories/files are removed from the upstream tarball:
 * bin contains various binaries and helper libs not relevant for Debian,
   auto-update scripts are kept (though not used in Debian)
 * data is instead shipped as redeclipse-data in Debian
 * src/enet is instead shipped as libenet in Debian
 * src/include contains duplicate headers already in other Debian packages
 * src/lib contains prebuilt duplicate libs already in other Debian packages
 * src/support contains duplicate source code for libs already in othe Debian
   packages.
Files-Excluded:
 bin/amd64
 bin/redeclipse.app
 bin/tools
 bin/x86
 data
 src/enet
 src/include
 src/lib
 src/support
License: Red-Eclipse
EOF

# "Red-Eclipse" summary license, indented
sed -e 's/^/\ /' -e 's/^\ $/\ \./' doc/license.txt >> debian/copyright-new

# Remove duplicated Format: line and insert upstream license dep5 file
sed '/Format:.*/d' doc/all-licenses.txt >> debian/copyright-new

# Remove record stating some dirs are omitted (the dirs are removed in Debian)
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^Files: bin\//' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Remove all records related to data/*
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^Files: data\//' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Remove record for "OFL-1.1" license (data/* content)
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^License: OFL-1.1$/' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Remove record for "CC-BY-3.0" license (data/* content)
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^License: CC-BY-3.0$/' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Remove record for "CC-BY-SA-3.0-US" license (data/* content)
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^License: CC-BY-3.0-US$/' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Remove record for "CC-BY-SA-3.0-AU" license (data/* content)
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^License: CC-BY-SA-3.0-AU$/' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Remove record for "CC0-1.0" license (data/* content)
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^License: CC0-1.0$/' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Remove record for "Expat" license (src/enet/* content)
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^License: Expat$/' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Add marker for inserting Debian chunk
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 ~ /^License: Zlib$/ { print "INSERT_DEBIAN_HERE" } { print }' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Debian chunk
ed -s debian/copyright-new <<EOF
/INSERT_DEBIAN_HERE/c
Files: debian/*
Copyright: 2011-2015 Martin Erik Werner <martinerikwerner@gmail.com>
License: Zlib
.
w
EOF

echo "done -> debian/copyright-new"