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
|
PKG=byobu
# generate and package up all the byobu scripts
bin_SCRIPTS = bin/byobu bin/byobu-config bin/byobu-export bin/byobu-janitor bin/byobu-launcher bin/byobu-launcher-install bin/byobu-launcher-uninstall bin/byobu-status bin/byobu-status-detail bin/motd+shell
# generate and package up the two config files which the scripts rely upon
libdirdir = $(prefix)/lib/
libdir_SCRIPTS = lib/byobu-config.ini lib/byobu.config
# generate and package up the libexec (helper scripts for status bar) files
# TODO -- localize these files using configure
libexecdirdir = $(prefix)/libexec/
libexecdir_SCRIPTS = libexec/arch libexec/battery libexec/cpu_count libexec/cpu_freq libexec/date libexec/disk libexec/ec2_cost libexec/fan_speed libexec/hostname libexec/ip_address libexec/load_average libexec/logo libexec/mail libexec/mem_available libexec/mem_used libexec/menu libexec/network libexec/processes libexec/reboot_required libexec/release libexec/temp_c libexec/temp_f libexec/time libexec/updates_available libexec/uptime libexec/users libexec/whoami libexec/wifi_quality
# only things above this line should be cleaned
CLEANFILES = $(bin_SCRIPTS) $(libdir_SCRIPTS) $(GEN_PROFILES) $(locale_SCRIPTS)
EXTRA_DIST = bin/byobu.sh bin/byobu-config.py bin/byobu-export.sh bin/byobu-janitor.sh bin/byobu-launcher.sh bin/byobu-launcher-install.sh bin/byobu-launcher-uninstall.sh bin/byobu-status.sh bin/byobu-status-detail.sh bin/motd+shell.sh
# package up the man and doc files
man_MANS = share/man/man1/*.1
doc_SCRIPTS = share/doc/help.txt
# package up the desktop file and corresponding graphic
applicationdir = $(prefix)/share/applications/
application_SCRIPTS = share/applications/byobu.desktop
iconsdir = $(prefix)/share/$(PKG)/pixmaps/
icons_SCRIPTS = share/byobu/pixmaps/byobu.svg
# package up the keybindings
keybiningsdir = $(prefix)/share/$(PKG)/keybindings/
keybinings_SCRIPTS = share/byobu/keybindings/f-keys share/byobu/keybindings/none share/byobu/keybindings/screen-escape-keys
# package up the windows
windowsdir = $(prefix)/share/$(PKG)/windows/
windows_SCRIPTS = share/byobu/windows/common
## makefile targets below this line
# bash scripts
bin/byobu: bin/byobu.sh
@rm -rf bin/byobu
@echo "#!$(SHELL)" > bin/byobu
@cat bin/byobu.sh >> bin/byobu
bin/byobu-export: bin/byobu-export.sh
@rm -rf bin/byobu-export
@echo "#!$(SHELL)" > bin/byobu-export
@cat bin/byobu-export.sh >> bin/byobu-export
bin/byobu-janitor: bin/byobu-janitor.sh
@rm -rf bin/byobu-janitor
@echo "#!$(SHELL)" > bin/byobu-janitor
@cat bin/byobu-janitor.sh >> bin/byobu-janitor
bin/byobu-launcher: bin/byobu-launcher.sh
@rm -rf bin/byobu-launcher
@echo "#!$(SHELL)" > bin/byobu-launcher
@cat bin/byobu-launcher.sh >> bin/byobu-launcher
bin/byobu-launcher-install: bin/byobu-launcher-install.sh
@rm -rf bin/byobu-launcher-install
@echo "#!$(SHELL)" > bin/byobu-launcher-install
@cat bin/byobu-launcher-install.sh >> bin/byobu-launcher-install
bin/byobu-launcher-uninstall: bin/byobu-launcher-uninstall.sh
@rm -rf bin/byobu-launcher-uninstall
@echo "#!$(SHELL)" > bin/byobu-launcher-uninstall
@cat bin/byobu-launcher-uninstall.sh >> bin/byobu-launcher-uninstall
bin/byobu-status: bin/byobu-status.sh
@rm -rf bin/byobu-status
@echo "#!$(SHELL)" > bin/byobu-status
@cat bin/byobu-status.sh >> bin/byobu-status
bin/byobu-status-detail: bin/byobu-status-detail.sh
@rm -rf bin/byobu-status-detail
@echo "#!$(SHELL)" > bin/byobu-status-detail
@cat bin/byobu-status-detail.sh >> bin/byobu-status-detail
bin/motd+shell: bin/motd+shell.sh
@rm -rf bin/motd+shell
@echo "#!$(SHELL)" > bin/motd+shell
@cat bin/motd+shell.sh >> bin/motd+shell
# python scripts
bin/byobu-config: bin/byobu-config.py
@rm -rf bin/byobu-config
@echo "#!$(PYTHON)" > bin/byobu-config
@cat bin/byobu-config.py >> bin/byobu-config
# build po stuffs
generate-po: update-pot
for po in po/*.po ; do \
lang=$${po#po/}; lang=$${lang%.po}; \
mkdir -p po/locale/$${lang}/LC_MESSAGES/; \
msgfmt $${po} -o po/locale/$${lang}/LC_MESSAGES/${PKG}.mo ; \
done
update-pot:
rm -f po/${PKG}.pot
xgettext -f po/POTFILES.Shell -o po/${PKG}.pot -L Shell
xgettext -f po/POTFILES.Python -o po/${PKG}.pot -L Python -j
for po in po/*.po ; do \
msgmerge $${po} po/${PKG}.pot -o $${po} ; \
done
# create the symlink for common keybinding
install-data-local: share/byobu/keybindings/f-keys generate-po
@mkdir -p $(prefix)/share/byobu/keybindings/ && cd $(prefix)/share/byobu/keybindings/ && ln -s f-keys common && echo fkeys installed
@mkdir -p $(prefix)/share/locale/ && cp -ar po/locale/* $(prefix)/share/locale/
# erase the po locale directory during clean
clean-local:
rm -rf po/locale
rm -rf $(prefix)/share/byobu/
|