-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmake-deb.sh
More file actions
93 lines (67 loc) · 2.42 KB
/
Copy pathmake-deb.sh
File metadata and controls
93 lines (67 loc) · 2.42 KB
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
87
88
89
90
91
92
93
#!/bin/bash
set -e
ARCH="$(dpkg --print-architecture)"
TARGET_ARCH="${1:-$ARCH}"
BUILD_DIR="built/debian"
DEB_DIR="${BUILD_DIR}/odcey_${TARGET_ARCH}"
MAINTAINER_0="comdivbyzero <project-Vostok@yandex.ru>"
MAINTAINER="${MAINTAINER_0}"
trash -f "${BUILD_DIR}"
mkdir -p ${DEB_DIR}/{DEBIAN,usr/bin,usr/share/doc/odcey}
if [ "$TARGET_ARCH" = "i386" ] && [ "$ARCH" = "amd64" ]; then
CC="cc -m32"
else
CC="cc"
fi
ost to-bin odcey.Cli "${DEB_DIR}/usr/bin/odcey" -m . -cc "$CC -flto=auto -O2 -s"
chmod 755 "${DEB_DIR}/usr/bin/odcey"
VERSION="$(${DEB_DIR}/usr/bin/odcey version)"
DEB_FILE="odcey_${VERSION}_${TARGET_ARCH}.deb"
cat > "${DEB_DIR}/DEBIAN/control" <<EOF
Package: odcey
Version: ${VERSION}
Section: utils
Priority: optional
Depends: libc6
Architecture: ${TARGET_ARCH}
Maintainer: ${MAINTAINER}
Description: Converter of Blackbox Component Builder .odc to the plain UTF-8
A command-line tool to convert .odc files from Blackbox Component Builder
into UTF-8 plain text.
EOF
cat > "${DEB_DIR}/usr/share/doc/odcey/copyright" <<EOF
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: odcey
Source: https://github.com/vostok-space/odcey
Files: *
Copyright: 2022-2026 comdivbyzero
License: Apache-2.0
EOF
cat > "${DEB_DIR}/usr/share/doc/odcey/changelog" <<EOF
odcey (0.4) stable; urgency=low
* Added option -write-descriptors
* Paragraph separator converts to line feed
* The last char is always line feed when printing to stdout
* Fixed links reading
-- ${MAINTAINER_0} Sat, 21 Feb 2026 00:00:00 +0200
odcey (0.3.2) stable; urgency=low
* Used «git config» command instead of editing .git/config
* Fixed a lot of minor drawbacks
-- ${MAINTAINER_0} Mon, 9 Feb 2026 00:00:00 +0200
odcey (0.3.1) stable; urgency=low
* Fixed excess memory allocation
-- ${MAINTAINER_0} Sun, 1 Feb 2026 00:00:00 +0200
odcey (0.3) stable; urgency=low
* Command «text» has become optional
* Fixed correction of characters SHORTCHAR, specific to Blackbox, in Utf-8
-- ${MAINTAINER_0} Tue, 27 Jan 2026 00:00:00 +0200
odcey (0.2) stable; urgency=low
* Initial package
-- ${MAINTAINER_0} Tue, 25 Mar 2025 00:00:00 +0200
EOF
gzip -9n "${DEB_DIR}/usr/share/doc/odcey/changelog"
find "${DEB_DIR}" -type d -exec chmod 0755 {} +
find "${DEB_DIR}" -type f -exec chmod 0644 {} +
chmod 0755 "${DEB_DIR}/usr/bin/odcey"
fakeroot dpkg-deb -Zgzip -z9 --build "${DEB_DIR}" "built/${DEB_FILE}"
lintian "built/${DEB_FILE}"