forked from mrclksr/DSBExec
-
Notifications
You must be signed in to change notification settings - Fork 1
/
dsbexec.pro
65 lines (53 loc) · 1.69 KB
/
dsbexec.pro
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
PROGRAM = dsbexec
PATH_DSBSU = dsbsu
isEmpty(PREFIX) {
PREFIX="/usr/local"
}
isEmpty(DATADIR) {
DATADIR=$${PREFIX}/share/$${PROGRAM}
}
TARGET = $${PROGRAM}
APPSDIR = $${PREFIX}/share/applications
INSTALLS = target desktopfile locales
TRANSLATIONS = locale/$${PROGRAM}_de.ts \
locale/$${PROGRAM}_fr.ts
LANGUAGES = de
TEMPLATE = app
QT += widgets
INCLUDEPATH += lib src
DEFINES += PROGRAM=\\\"$${PROGRAM}\\\" LOCALE_PATH=\\\"$${DATADIR}\\\"
DEFINES += PATH_DSBSU=\\\"$${PATH_DSBSU}\\\"
QMAKE_POST_LINK = $(STRIP) $(TARGET)
QMAKE_EXTRA_TARGETS += distclean cleanqm readme readmemd
HEADERS += lib/libdsbexec.h \
lib/qt-helper/qt-helper.h \
src/mainwin.h
SOURCES += src/main.cpp \
src/mainwin.cpp \
lib/qt-helper/qt-helper.cpp \
lib/libdsbexec.c
target.files = $${PROGRAM}
target.path = $${PREFIX}/bin
desktopfile.path = $${APPSDIR}
desktopfile.files = $${PROGRAM}.desktop
locales.path = $${DATADIR}
readme.target = readme
readme.files = readme.mdoc
readme.commands = mandoc -mdoc readme.mdoc | perl -e \'foreach (<STDIN>) { \
\$$_ =~ s/(.)\x08\1/\$$1/g; \$$_ =~ s/_\x08(.)/\$$1/g; \
print \$$_ \
}\' | sed '1,1d' > README
readmemd.target = readmemd
readmemd.files = readme.mdoc
readmemd.commands = mandoc -mdoc -Tmarkdown readme.mdoc | \
sed -e \'1,1d; \$$,\$$d\' > README.md
qtPrepareTool(LRELEASE, lrelease)
for(a, LANGUAGES) {
in = locale/$${PROGRAM}_$${a}.ts
out = locale/$${PROGRAM}_$${a}.qm
locales.files += $$out
cmd = $$LRELEASE $$in -qm $$out
system($$cmd)
}
cleanqm.commands = rm -f $${locales.files}
distclean.depends = cleanqm