-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate_package.sh
62 lines (50 loc) · 2.65 KB
/
create_package.sh
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
#!/bin/sh
# ___ ___
# | __|_ _ _ _ __ _ _| _ \__ _ __ _ ___ ___
# | _/ _` | ' \/ _| || | _/ _` / _` / -_|_-<
# |_|\__,_|_||_\__|\_, |_| \__,_\__, \___/__/
# |__/ |___/
#
# This file is part of kristuff/apache-fancy-pages.
# v0.2.1 - Copyright (c) 2021-2022 Kristuff <[email protected]>
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
# our dist directory
mkdir -p dist
# create a clean debian package directory
rm -rf debian
mkdir -p debian/DEBIAN
mkdir -p debian/usr/share/apache-fancy-pages
mkdir -p debian/usr/share/doc/apache-fancy-pages
mkdir -p debian/usr/share/man/man5
mkdir -p debian/etc/apache2/conf-available
# populate the debian directory
cp deb/control debian/DEBIAN
cp deb/conffiles debian/DEBIAN
cp deb/copyright debian/usr/share/doc/apache-fancy-pages
cp deb/changelog debian/usr/share/doc/apache-fancy-pages/changelog.Debian
gzip -9 -n debian/usr/share/doc/apache-fancy-pages/changelog.Debian
cp deb/changelog debian/usr/share/doc/apache-fancy-pages/changelog
gzip -9 -n debian/usr/share/doc/apache-fancy-pages/changelog
cp -R tests debian/usr/share/doc/apache-fancy-pages
cp -R assets/css debian/usr/share/apache-fancy-pages
cp -R assets/js debian/usr/share/apache-fancy-pages
cp -R assets/icons debian/usr/share/apache-fancy-pages
cp assets/*.html debian/usr/share/apache-fancy-pages
cp -R assets/error debian/usr/share/apache-fancy-pages
cp conf/fancy-index.conf debian/etc/apache2/conf-available
cp conf/fancy-index-tests.conf debian/etc/apache2/conf-available
cp conf/fancy-error.conf debian/etc/apache2/conf-available
# convert and deploy man page
/usr/bin/pandoc --standalone --to man deb/man-fancy-index.md -o debian/usr/share/man/man5/fancy-index.conf.5
gzip -9 -n debian/usr/share/man/man5/fancy-index.conf.5
/usr/bin/pandoc --standalone --to man deb/man-fancy-index-tests.md -o debian/usr/share/man/man5/fancy-index-tests.conf.5
gzip -9 -n debian/usr/share/man/man5/fancy-index-tests.conf.5
/usr/bin/pandoc --standalone --to man deb/man-fancy-error.md -o debian/usr/share/man/man5/fancy-error.conf.5
gzip -9 -n debian/usr/share/man/man5/fancy-error.conf.5
# adjust permissions
find debian -type d -exec chmod 0755 {} \; #set directory attributes
find debian -type f -exec chmod 0644 {} \; #set data file attributes
# finally build the package
dpkg-deb --root-owner-group --build debian dist