This repository has been archived by the owner on Nov 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
110 lines (83 loc) · 5.01 KB
/
Makefile
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
build_command=debuild -b -uc -us
ifdef debug
build_options=-e DEB_BUILD_OPTIONS="nostrip noopt debug"
build_command=dpkg-buildpackage -b -uc -us
endif
build-everything: build-meson-image build-rust-image scdoc-build wlroots-build-deb sway-build-deb swaylock-build-deb xdg-desktop-portal-wlr-build-deb mako-build-deb kanshi-build-deb waybar-build-deb clipman-install wldash-install wfconfig-build-deb wfshell-build-deb wayfire-build-deb
build-meson-image:
docker build --target meson-builder -t sway_build_meson .
build-rust-image:
docker build --target rust-builder -t sway_build_rust .
install-all-debs:
cd debs/; ls -1 | tr '\n' '\0' | xargs -0 -n 1 basename | grep deb | grep -v ddeb | grep -v dev | grep -v skele | grep -v udeb | xargs sudo dpkg -i
yolo: build-everything install-all-debs
echo "YOLO"
wlroots-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd wlroots; $(build_command)"
make fix-permissions tidy
sway-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c 'apt-get update; dpkg -i debs/libwlroots*deb; apt-get -f install; apt-get install -y pkgconf; cd sway; $(build_command)'
make fix-permissions tidy
swaylock-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "dpkg -i debs/libwlroots*deb; cd swaylock; $(build_command)"
make fix-permissions tidy
mako-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd mako; $(build_command)"
make fix-permissions tidy
xdg-desktop-portal-wlr-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd xdg-desktop-portal-wlr; $(build_command)"
make fix-permissions tidy
kanshi-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd kanshi; $(build_command)"
make fix-permissions tidy
waybar-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd Waybar; $(build_command)"
make fix-permissions tidy
rofi-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd rofi; $(build_command)"
make fix-permissions tidy
nm-applet-build:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd network-manager-applet; $(build_command)"
make fix-permissions tidy
wofi-build-install:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd wofi; meson build; ninja -C build"
make fix-permissions tidy
ln -sf $(shell pwd)/wofi/build/wofi ~/bin/
rootbar-build-install:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd rootbar; meson build; ninja -C build"
make fix-permissions tidy
ln -sf $(shell pwd)/rootbar/build/rootbar ~/bin/
wfrecorder-build-install:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c "cd wf-recorder; rm build -rf; meson build; ninja -C build"
make fix-permissions tidy
ln -sf $(shell pwd)/wf-recorder/build/wf-recorder ~/bin/
clipman-install:
cd clipman; go install; ln -sf ~/go/bin/clipman ~/bin/
wldash-install:
docker run -t --rm -v $(shell pwd)/wldash:/workdir -w "/workdir" sway_build_rust sh -c "cargo build --release"
make fix-permissions tidy
ln -sf $(shell pwd)/wldash/target/release/wldash ~/bin
wfconfig-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c 'dpkg -i debs/libwlroots*deb; apt-get -f install; cd wf-config; $(build_command)'
make fix-permissions tidy
wcm-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c 'dpkg -i debs/libwlroots*deb debs/*wf-config*.deb debs/wayfire*.deb; apt-get -f install; cd wcm; $(build_command)'
make fix-permissions tidy
wfshell-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c 'dpkg -i debs/libwlroots*deb debs/libwf-config*.deb debs/wayfire*.deb; apt-get -f install; cd wf-shell; $(build_command)'
make fix-permissions tidy
wayfire-build-deb:
docker run -t --rm -v $(shell pwd):/workdir -w "/workdir" $(build_options) sway_build_meson sh -c 'dpkg -i debs/libwlroots*deb debs/libwf-config*.deb; apt-get -f install; cd wayfire; $(build_command)'
make fix-permissions tidy
install-todays-debs:
find debs/ -type f -newermt '$(shell date +'%Y-%m-%d')' | grep -v "\-dev" | xargs sudo dpkg -i
install-todays-ddebs:
find ddebs/ -type f -newermt '$(shell date +'%Y-%m-%d')' | grep -v "\-dev" | xargs sudo dpkg -i
tidy:
mkdir -p debs
mkdir -p ddebs
find . -maxdepth 1 -name '*.deb' -type f -print0 | xargs -0r mv -t debs/
find . -maxdepth 1 -name '*.ddeb' -type f -print0 | xargs -0r mv -t ddebs/
rm -f *build *buildinfo *changes *udeb
fix-permissions:
sudo chown $(shell id -u):$(shell id -g) . -Rf