File: generate-copyright

package info (click to toggle)
redeclipse-data 1.6.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 969,652 kB
  • sloc: sh: 230; makefile: 21
file content (64 lines) | stat: -rwxr-xr-x 2,391 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

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

all_licenses=doc/all-licenses.txt

# 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:
 * data/fonts/Play* are font source files which are removed since they are
   shipped in the fonts-play package in Debian.
 * data/fonts/play* are generated font png files which are removed to simplify
   the build process.
 * bin contains various binaries and helper libs not relevant for Debian, plus
   auto-update scripts which are instead shipped as part of the client/server
   redeclipse in Debian.
 * src contains source code which is shipped as part of the client/server
   redeclipse package in Debian.
 * sql contains sql configurations which is shipped as part of the
   client/server redeclipse package in Debian.
Files-Excluded:
 data/fonts/Play*
 data/fonts/play*
 bin
 src
 sql
License: Red-Eclipse
EOF

# 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' "$all_licenses"  >> debian/copyright-new

# Remove all records related to bin/*, config/*, doc/*, data/fonts/* and src/*
# (not present in the source)
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^Files: (bin|config|doc|src)\// ' debian/copyright-new > debian/copyright-temp
mv debian/copyright-temp debian/copyright-new

# Remove records for Play font files (deleted from source package)
awk 'BEGIN{ ORS="\n\n"; RS="" ; FS="\n"} $1 !~ /^Files: data\/fonts\/[Pp]lay/' 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
ex -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"