forked from valr/awf
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.sh
More file actions
48 lines (44 loc) · 1.6 KB
/
Copy pathbuild.sh
File metadata and controls
48 lines (44 loc) · 1.6 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
#!/bin/bash
# Debian: sudo apt install build-essential dh-make dh-autoreconf pkgconf intltool libnotify-dev libgtk2.0-dev libgtk-3-dev libgtk-4-dev libgtk-5-dev qtbase5-dev qt6-base-dev qt7-base-dev libnotify-bin
# Fedora: sudo dnf install autoconf automake libnotify-devel gtk2-devel gtk3-devel gtk4-devel gtk5-devel desktop-file-utils qt5-qtbase-devel qt6-qtbase-devel qt7-qtbase-devel
# openSUSE: sudo zypper install autoconf automake libnotify-devel gtk2-devel gtk3-devel gtk4-devel gtk5-devel desktop-file-utils qt5-base-devel qt6-base-devel qt7-base-devel
#
# supported options for build.sh and configure.ac
# --disable-gtk2 --disable-gtk3 --disable-gtk4 --disable-gtk5 --disable-qt5 --disable-qt6 --disable-qt7
# OR
# --enable-only-gtk2
# OR
# --enable-only-gtk3
# OR
# --enable-only-gtk4
# OR
# --enable-only-gtk5
# OR
# --enable-only-qt5
# OR
# --enable-only-qt6
# OR
# --enable-only-qt7
rm -rf awf-gtk2* awf-gtk3* awf-gtk4* awf-gtk5* awf-qt5* awf-qt6* awf-qt7* builder/
# copy to a tmp directory
mkdir builder builder/src builder/data
cp /usr/share/common-licenses/GPL*3 builder/LICENSE
cp configure.ac builder/
cp Makefile.am builder/
cp src/Makefile.am builder/src/
cp src/awf-gtk*.c builder/src/
cp src/awf-qt*.cpp builder/src/
cp src/awf.rc builder/src/
cp data/awf.ico builder/data/
# build
cd builder/
autoreconf -fi && ./configure "$@" && make -s
result=$?
cd ..
# final
if [ $result -eq 0 ]; then
cp builder/src/awf-gtk* builder/src/awf-qt* .
rm -f awf-gtk*.c awf-qt*.cpp awf-qt*.moc awf-qt*.o
ls -altrh awf-gtk2* awf-gtk3* awf-gtk4* awf-gtk5* awf-qt5* awf-qt6* awf-qt7*
fi
rm -rf builder/