mirror of
https://github.com/linux-msm/tqftpserv.git
synced 2026-10-07 06:28:28 -07:00
Compare commits
1
Commits
master
...
topic/meson
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96f76d8481 |
No files matched your search
@@ -1,25 +0,0 @@
|
|||||||
TQFTPSERV := tqftpserv
|
|
||||||
|
|
||||||
CFLAGS += -Wall -g -O2
|
|
||||||
LDFLAGS += -lqrtr
|
|
||||||
prefix ?= /usr/local
|
|
||||||
|
|
||||||
bindir := $(prefix)/bin
|
|
||||||
servicedir := $(prefix)/lib/systemd/system
|
|
||||||
|
|
||||||
SRCS := tqftpserv.c translate.c
|
|
||||||
|
|
||||||
OBJS := $(SRCS:.c=.o)
|
|
||||||
|
|
||||||
$(TQFTPSERV): $(OBJS)
|
|
||||||
$(CC) -o $@ $^ $(LDFLAGS)
|
|
||||||
|
|
||||||
tqftpserv.service: tqftpserv.service.in
|
|
||||||
@sed 's+TQFTPSERV_PATH+$(bindir)+g' $< > $@
|
|
||||||
|
|
||||||
install: $(TQFTPSERV) tqftpserv.service
|
|
||||||
@install -D -m 755 $(TQFTPSERV) $(DESTDIR)$(bindir)/$(TQFTPSERV)
|
|
||||||
@install -D -m 644 tqftpserv.service $(DESTDIR)$(servicedir)/tqftpserv.service
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(TQFTPSERV) $(OBJS) tqftpserv.service
|
|
||||||
+32
@@ -0,0 +1,32 @@
|
|||||||
|
project('tqftpserv',
|
||||||
|
'c',
|
||||||
|
default_options: [
|
||||||
|
'warning_level=1',
|
||||||
|
'buildtype=release',
|
||||||
|
])
|
||||||
|
|
||||||
|
prefix = get_option('prefix')
|
||||||
|
systemd = dependency('systemd')
|
||||||
|
systemd_system_unit_dir = get_option('systemd-unit-prefix')
|
||||||
|
if systemd_system_unit_dir == ''
|
||||||
|
systemd_system_unit_dir = systemd.get_variable(
|
||||||
|
pkgconfig : 'systemdsystemunitdir',
|
||||||
|
pkgconfig_define: ['prefix', prefix])
|
||||||
|
endif
|
||||||
|
|
||||||
|
qrtr_dep = dependency('qrtr')
|
||||||
|
|
||||||
|
tqftpserv_srcs = ['translate.c',
|
||||||
|
'tqftpserv.c']
|
||||||
|
executable('tqftpserv',
|
||||||
|
tqftpserv_srcs,
|
||||||
|
dependencies : qrtr_dep,
|
||||||
|
install : true)
|
||||||
|
|
||||||
|
systemd_unit_conf = configuration_data()
|
||||||
|
systemd_unit_conf.set('prefix', prefix)
|
||||||
|
configure_file(
|
||||||
|
input : 'tqftpserv.service.in',
|
||||||
|
output : 'tqftpserv.service',
|
||||||
|
configuration : systemd_unit_conf,
|
||||||
|
install_dir : systemd_system_unit_dir)
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
option('systemd-unit-prefix',
|
||||||
|
type: 'string',
|
||||||
|
description: 'Directory for systemd system unit files'
|
||||||
|
)
|
||||||
@@ -4,7 +4,7 @@ Requires=qrtr-ns.service
|
|||||||
After=qrtr-ns.service
|
After=qrtr-ns.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=TQFTPSERV_PATH/tqftpserv
|
ExecStart=@prefix@/bin/tqftpserv
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|||||||
Reference in new issue
Block a user