-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (42 loc) · 1.26 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
PACKAGE := xx
VERSION := 0.7
AUTHOR := R.Jaksa 2023,2024 GPLv3
SUBVERSION := a
PKGNAME := xx-$(VERSION)$(SUBVERSION)
all:
@echo -e "\nto install choose single-user, group-based or host-based access:\n"
@echo " make install"
@echo " make install4group"
@echo " make install4host"
@echo
# install to the private bin
install: xx.tmp installpulse
sed -i -z 's:\n#[GH]#[^\n]*::g' $<
mv $< ~/bin/xx
# install the group-based-access version
install4group: xx.tmp installpulse
sed -i -z 's:\n#H#[^\n]*::g' $<
sed -i 's:^#G# *::g' $<
mv $< ~/bin/xx
# install the host-based-access version
install4host: xx.tmp installpulse
sed -i -z 's:\n#G#[^\n]*::g' $<
sed -i 's:^#H# *::g' $<
mv $< ~/bin/xx
# add version name to the installed script
# remove section 3. and pulse-cleanup if /etc/pulse doesn't exist
xx.tmp: xx Makefile
sed 's:\(from the text console\):\1 (version $(PKGNAME)):' $< > $@
if test ! -d /etc/pulse; then \
perl -gpi -e 's/\n# 3. .*?\n\n/\n/s' $@; \
perl -gpi -e 's/\npkill -9 pulseaudio.*?\n/\n/s' $@; \
perl -gpi -e 's/\nrm -rvf \/tmp\/pulse.*?\n/\n/s' $@; fi
chmod 755 $@
# interactive overwrite of pulse configs if needed
installpulse:
@pulse/install-clientconf
@pulse/install-defaultpa
@echo
clean:
rm -f xx.tmp
-include ~/.github/Makefile.git