forked from crosswire/xiphos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.ci-build.yml
196 lines (190 loc) · 5.05 KB
/
.ci-build.yml
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
requires:
archlinux:
- appstream-glib
- cmake
- dbus-glib
- docbook-utils
- enchant
- git
- gnome-common
- gtk3
- gtkmm
- intltool
- libxml2
- minizip
- python
- sword
- webkit2gtk
- zip
# base-devel group (for AUR installs):
- autoconf
- automake
- binutils
- bison
- fakeroot
- file
- findutils
- flex
- gawk
- gcc
- gettext
- grep
- groff
- gzip
- libtool
- m4
- make
- pacman
- patch
- pkgconf
- sed
- sudo
- texinfo
- which
debian:
- appstream-util
- cmake
- docbook-utils
- g++
- desktop-file-utils
- fp-utils
- git
- gsettings-desktop-schemas-dev
- intltool
- itstool
- libbiblesync-dev
- libdbus-glib-1-dev
- libglade2-dev
- libenchant-dev
- libgail-3-dev
- libgtk-3-dev
- libminizip-dev
- libsoup2.4-dev
- libsword-dev
- libwebkit2gtk-4.0-dev
- libxml2-dev
- libxml2-utils
- make
- python-dev
- swig
- uuid-dev
- uuid-runtime
- yelp-tools
- xzip # Needed to build gtkhtml from source
- zip
fedora:
- biblesync-devel
- cmake
- dbus-glib-devel
- desktop-file-utils
- git
- docbook-utils
- gcc-c++
- gtk3-devel
- gtkhtml3-devel
- intltool
- itstool
- libappstream-glib-devel
- libuuid-devel
- libxml2-devel
- make
- minizip-devel
- rpm-build
- sword-devel
- webkitgtk4-devel
- yelp
- yelp-tools
- zip
ubuntu:
- appstream-util
- cmake
- g++
- desktop-file-utils
- fp-utils
- git
- gsettings-desktop-schemas-dev
- intltool
- itstool
- libdbus-glib-1-dev
- libenchant-dev
- libgail-3-dev
- libglade2-dev
- libgtk-3-dev
- libminizip-dev
- libsword-dev
- libwebkit2gtk-4.0-dev
- libxml2-dev
- libxml2-utils
- make
- python-dev
- swig
- uuid-dev
- uuid-runtime
- yelp-tools
- xzip # Needed to build gtkhtml from source
- zip
variables:
- CFLAGS="-Wall -Werror=format-security"
before_scripts:
- |
START_DIR="$(pwd)"
WORK_DIR="/dep_build"
mkdir -p "${WORK_DIR}"
if [ "${DISTRO_NAME}" == "archlinux" ];then
cd "${WORK_DIR}"
id -u aur_install &>/dev/null || useradd -r -m -U -G wheel -k /dev/null aur_install
install -m600 /dev/stdin /etc/sudoers.d/70-wheel <<< '%wheel ALL=(ALL) ALL'
install -m600 /dev/stdin /etc/sudoers.d/99-aur_install <<< 'Defaults:aur_install !authenticate'
curl -o /home/aur_install/aur_install https://raw.githubusercontent.com/gik0geck0/aur_install/master/aur_install.sh
chmod +x /home/aur_install/aur_install
aur_install() {
su -l aur_install -c "./aur_install $1"
}
aur_install biblesync
aur_install gtkhtml4
fi
if [ "${DISTRO_NAME}" == "debian" -o "${DISTRO_NAME}" == "ubuntu" ]; then
# build gtkhtml4 from source
cd "${WORK_DIR}"
curl -Ls -o gtkhtml-4.10.0.tar.xz https://download.gnome.org/sources/gtkhtml/4.10/gtkhtml-4.10.0.tar.xz
tar xf gtkhtml-4.10.0.tar.xz
cd gtkhtml-4.10.0
./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib/gtkhtml4 --localstatedir=/var --disable-static
make -j$(nproc)
make install
fi
if [ "${DISTRO_NAME}" == "ubuntu" ];then
# build biblesync from source
cd "${WORK_DIR}"
curl -Ls -o biblesync-1.2.0.tar.gz https://github.com/karlkleinpaste/biblesync/archive/1.2.0.tar.gz
tar xf biblesync-1.2.0.tar.gz
cd biblesync-1.2.0
mkdir -p build
cd build
cmake -DBUILD_SHARED_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=/usr -DLIBDIR=/usr/lib ..
make -j$(nproc)
make install
# update sword from 1.7.3 to 1.8.1
cd "${WORK_DIR}"
curl -Ls -o sword-1.8.1.tar.gz https://www.crosswire.org/ftpmirror/pub/sword/source/v1.8/sword-1.8.1.tar.gz
curl -Ls -o sword-1.8.1-cmake.diff https://src.fedoraproject.org/rpms/sword/raw/master/f/sword-1.8.1-cmake.diff
curl -Ls -o sword-1.8.1-icu61.diff https://src.fedoraproject.org/rpms/sword/raw/master/f/sword-1.8.1-icu61.diff
curl -Ls -o sword-1.8.1-swig.diff https://src.fedoraproject.org/rpms/sword/raw/master/f/sword-1.8.1-swig.diff
tar xf sword-1.8.1.tar.gz
cd sword-1.8.1
patch -p1 -i ../sword-1.8.1-cmake.diff
patch -p1 -i ../sword-1.8.1-icu61.diff
patch -p1 -i ../sword-1.8.1-swig.diff
mkdir -p build
cd build
cmake -DLIBSWORD_LIBRARY_TYPE="Shared" -DSYSCONF_INSTALL_DIR='/etc' -DSWORD_BUILD_TESTS="Yes" -DSWORD_BINDINGS="Python" -DCMAKE_INSTALL_PREFIX=/usr -DLIB_INSTALL_DIR=/usr/lib/x86_64-linux-gnu ..
make -j$(nproc)
make install
fi
build_scripts:
- |
set -ex
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -DGTKHTML=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make .
make -C build -j$(nproc)
make -C build mhelp package_source