-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
39 lines (32 loc) · 1.2 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
DESTDIR=/
all: clean build
build: buildmo
mkdir -p build/usr/lib/ || true
cp -prfv live-installer build/usr/lib/
#set parmissions
chmod 755 -R build
chown root -R build
buildmo:
mkdir -p build/usr/share/ || true
@echo "Building the mo files"
# WARNING: the second sed below will only works correctly with the languages that don't contain "-"
for file in `ls po/*.po`; do \
lang=`echo $$file | sed 's@po/@@' | sed 's/\.po//' | sed 's/live-installer-//'`; \
install -d build/usr/share/locale/$$lang/LC_MESSAGES/; \
msgfmt -o build/usr/share/locale/$$lang/LC_MESSAGES/live-installer.mo $$file; \
done \
install:
cp -prfv build/* $(DESTDIR)/
mkdir -p $(DESTDIR)/usr/share/applications/ || true
mkdir -p $(DESTDIR)/usr/bin/ || true
install live-installer.desktop $(DESTDIR)/usr/share/applications/live-installer.desktop
mkdir -p $(DESTDIR)/etc/X11/Xsession.d/ || true
install 00-live $(DESTDIR)/etc/X11/Xsession.d/00-live
install live-installer.sh $(DESTDIR)/usr/bin/live-installer
uninstall:
rm -rf $(DESTDIR)/usr/lib/live-installer
rm -f $(DESTDIR)/usr/bin/live-installer
rm -f $(DESTDIR)/usr/share/applications/live-installer.desktop
clean:
rm -rf build
find po/ | grep "*.mo" | xargs rm -f