| 1 | MAINTAINERCLEANFILES = $(srcdir)/Makefile.in |
|---|
| 2 | |
|---|
| 3 | SUFFIXES = .in |
|---|
| 4 | |
|---|
| 5 | sources = openct.udev.in openct.udev.modalias.in openct.udev.compat openct_usb.mdev.in \ |
|---|
| 6 | openct.conf.in openct.hald.in reader.conf.in \ |
|---|
| 7 | init-script.in openct.hald.in openct_usb.mdev.in \ |
|---|
| 8 | openct_usb.in openct_pcmcia.in openct_serial.in |
|---|
| 9 | generated_data = openct.udev openct.udev.modalias openct_usb.mdev \ |
|---|
| 10 | openct.conf openct.hald reader.conf |
|---|
| 11 | noinst_generated_scripts = init-script openct.hald openct_usb.mdev |
|---|
| 12 | udev_generated_scripts = openct_usb openct_pcmcia openct_serial |
|---|
| 13 | |
|---|
| 14 | CLEANFILES = $(generated_data) $(noinst_generated_scripts) $(udev_generated_scripts) |
|---|
| 15 | |
|---|
| 16 | nodist_noinst_SCRIPTS = $(noinst_generated_scripts) |
|---|
| 17 | dist_noinst_DATA = Info.plist openct.fdi openct-policy.fdi openct-disable.fdi $(sources) |
|---|
| 18 | nodist_noinst_DATA = $(generated_data) |
|---|
| 19 | |
|---|
| 20 | if ENABLE_UDEV |
|---|
| 21 | nodist_udev_SCRIPTS = $(udev_generated_scripts) |
|---|
| 22 | else |
|---|
| 23 | nodist_noinst_SCRIPTS += $(udev_generated_scripts) |
|---|
| 24 | endif |
|---|
| 25 | |
|---|
| 26 | if ENABLE_HOTPLUG |
|---|
| 27 | hotplug_DATA = openct.usermap |
|---|
| 28 | else |
|---|
| 29 | dist_noinst_DATA += openct.usermap |
|---|
| 30 | endif |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | sysconf_DATA=#required in order to create dir |
|---|
| 34 | install-exec-hook: install-sysconfDATA openct.conf |
|---|
| 35 | if [ -f "$(DESTDIR)$(sysconfdir)/openct.conf" ]; then \ |
|---|
| 36 | $(INSTALL_DATA) openct.conf "$(DESTDIR)$(sysconfdir)/openct.conf.new"; \ |
|---|
| 37 | else \ |
|---|
| 38 | $(INSTALL_DATA) openct.conf "$(DESTDIR)$(sysconfdir)/openct.conf"; \ |
|---|
| 39 | fi |
|---|
| 40 | |
|---|
| 41 | .in: |
|---|
| 42 | sed \ |
|---|
| 43 | -e 's|@bindir[@]|$(bindir)|g' \ |
|---|
| 44 | -e 's|@sbindir[@]|$(sbindir)|g' \ |
|---|
| 45 | -e 's|@libdir[@]|$(libdir)|g' \ |
|---|
| 46 | -e 's|@udevdir[@]|$(udevdir)|g' \ |
|---|
| 47 | -e 's|@localstatedir[@]|$(localstatedir)|g' \ |
|---|
| 48 | -e 's|@OPENCT_SOCKET_PATH[@]|@OPENCT_SOCKET_PATH@|g' \ |
|---|
| 49 | -e 's|@ENABLE_NON_PRIVILEGED[@]|@ENABLE_NON_PRIVILEGED@|g' \ |
|---|
| 50 | -e 's|@daemon_user[@]|@daemon_user@|g' \ |
|---|
| 51 | -e 's|@daemon_groups[@]|@daemon_groups@|g' \ |
|---|
| 52 | < "$<" > "$@" |
|---|