Skip to content

Commit 378fc38

Browse files
committed
AnalogueRepeater: Change paths to GNU/Linux standards
This change continues with the changes to make things go in standard paths. It should install things in the following directories: ${prefix}/bin: analoguerepeater ${prefix}/sbin: analoguerepeaterd ${prefix}/etc/opendv: configuration files ${prefix}/var/log/opendv: log files Again, the package building tools will mutate these into appropriate locations for those distributions.
1 parent a7418d8 commit 378fc38

File tree

4 files changed

+102
-39
lines changed

4 files changed

+102
-39
lines changed

AnalogueRepeater/Makefile.am

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
opendvlogdir = ${localstatedir}/log/opendv
2+
opendvlog_DATA =
3+
4+
pkgsysconfdir = ${sysconfdir}/opendv
5+
pkgsysconf_DATA =
6+
7+
DEFS += \
8+
-DLOG_DIR=\"${opendvlogdir}\" \
9+
-DCONF_DIR=\"${pkgsysconfdir}\"
10+
111
noinst_LIBRARIES = libCommon.a
212

313
libCommon_a_SOURCES = \

AnalogueRepeater/Makefile.in

+92-13
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@SET_MAKE@
1616

1717

18+
1819
VPATH = @srcdir@
1920
am__is_gnu_make = { \
2021
if test -z '$(MAKELEVEL)'; then \
@@ -160,7 +161,8 @@ am_libCommon_a_OBJECTS = \
160161
Common/libCommon_a-WAVFileReader.$(OBJEXT) \
161162
Common/libCommon_a-WAVFileStore.$(OBJEXT) $(am__objects_1)
162163
libCommon_a_OBJECTS = $(am_libCommon_a_OBJECTS)
163-
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"
164+
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" \
165+
"$(DESTDIR)$(opendvlogdir)" "$(DESTDIR)$(pkgsysconfdir)"
164166
PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS)
165167
am__analoguerepeater_SOURCES_DIST = Common/ActiveHangSet.cpp \
166168
Common/AddressTextCtrl.cpp Common/CallsignTextCtrl.cpp \
@@ -264,6 +266,34 @@ am__can_run_installinfo = \
264266
n|no|NO) false;; \
265267
*) (install-info --version) >/dev/null 2>&1;; \
266268
esac
269+
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
270+
am__vpath_adj = case $$p in \
271+
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
272+
*) f=$$p;; \
273+
esac;
274+
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
275+
am__install_max = 40
276+
am__nobase_strip_setup = \
277+
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
278+
am__nobase_strip = \
279+
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
280+
am__nobase_list = $(am__nobase_strip_setup); \
281+
for p in $$list; do echo "$$p $$p"; done | \
282+
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
283+
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
284+
if (++n[$$2] == $(am__install_max)) \
285+
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
286+
END { for (dir in files) print dir, files[dir] }'
287+
am__base_list = \
288+
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
289+
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
290+
am__uninstall_files_from_dir = { \
291+
test -z "$$files" \
292+
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
293+
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
294+
$(am__cd) "$$dir" && rm -f $$files; }; \
295+
}
296+
DATA = $(opendvlog_DATA) $(pkgsysconf_DATA)
267297
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
268298
# Read a list of newline-separated strings from the standard input,
269299
# and print each of them once, without duplicates. Input order is
@@ -324,7 +354,8 @@ CXX = @CXX@
324354
CXXDEPMODE = @CXXDEPMODE@
325355
CXXFLAGS = @CXXFLAGS@
326356
CYGPATH_W = @CYGPATH_W@
327-
DEFS = @DEFS@
357+
DEFS = @DEFS@ -DLOG_DIR=\"${opendvlogdir}\" \
358+
-DCONF_DIR=\"${pkgsysconfdir}\"
328359
DEPDIR = @DEPDIR@
329360
ECHO_C = @ECHO_C@
330361
ECHO_N = @ECHO_N@
@@ -420,6 +451,10 @@ target_alias = @target_alias@
420451
top_build_prefix = @top_build_prefix@
421452
top_builddir = @top_builddir@
422453
top_srcdir = @top_srcdir@
454+
opendvlogdir = ${localstatedir}/log/opendv
455+
opendvlog_DATA =
456+
pkgsysconfdir = ${sysconfdir}/opendv
457+
pkgsysconf_DATA =
423458
noinst_LIBRARIES = libCommon.a
424459
libCommon_a_SOURCES = Common/ArduinoController.cpp \
425460
Common/AudioDelay.cpp Common/CWKeyer.cpp \
@@ -1640,6 +1675,48 @@ AnalogueRepeater/analoguerepeaterd-AnalogueRepeaterStatusData.obj: AnalogueRepea
16401675
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='AnalogueRepeater/AnalogueRepeaterStatusData.cpp' object='AnalogueRepeater/analoguerepeaterd-AnalogueRepeaterStatusData.obj' libtool=no @AMDEPBACKSLASH@
16411676
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
16421677
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(analoguerepeaterd_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o AnalogueRepeater/analoguerepeaterd-AnalogueRepeaterStatusData.obj `if test -f 'AnalogueRepeater/AnalogueRepeaterStatusData.cpp'; then $(CYGPATH_W) 'AnalogueRepeater/AnalogueRepeaterStatusData.cpp'; else $(CYGPATH_W) '$(srcdir)/AnalogueRepeater/AnalogueRepeaterStatusData.cpp'; fi`
1678+
install-opendvlogDATA: $(opendvlog_DATA)
1679+
@$(NORMAL_INSTALL)
1680+
@list='$(opendvlog_DATA)'; test -n "$(opendvlogdir)" || list=; \
1681+
if test -n "$$list"; then \
1682+
echo " $(MKDIR_P) '$(DESTDIR)$(opendvlogdir)'"; \
1683+
$(MKDIR_P) "$(DESTDIR)$(opendvlogdir)" || exit 1; \
1684+
fi; \
1685+
for p in $$list; do \
1686+
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
1687+
echo "$$d$$p"; \
1688+
done | $(am__base_list) | \
1689+
while read files; do \
1690+
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(opendvlogdir)'"; \
1691+
$(INSTALL_DATA) $$files "$(DESTDIR)$(opendvlogdir)" || exit $$?; \
1692+
done
1693+
1694+
uninstall-opendvlogDATA:
1695+
@$(NORMAL_UNINSTALL)
1696+
@list='$(opendvlog_DATA)'; test -n "$(opendvlogdir)" || list=; \
1697+
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
1698+
dir='$(DESTDIR)$(opendvlogdir)'; $(am__uninstall_files_from_dir)
1699+
install-pkgsysconfDATA: $(pkgsysconf_DATA)
1700+
@$(NORMAL_INSTALL)
1701+
@list='$(pkgsysconf_DATA)'; test -n "$(pkgsysconfdir)" || list=; \
1702+
if test -n "$$list"; then \
1703+
echo " $(MKDIR_P) '$(DESTDIR)$(pkgsysconfdir)'"; \
1704+
$(MKDIR_P) "$(DESTDIR)$(pkgsysconfdir)" || exit 1; \
1705+
fi; \
1706+
for p in $$list; do \
1707+
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
1708+
echo "$$d$$p"; \
1709+
done | $(am__base_list) | \
1710+
while read files; do \
1711+
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgsysconfdir)'"; \
1712+
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgsysconfdir)" || exit $$?; \
1713+
done
1714+
1715+
uninstall-pkgsysconfDATA:
1716+
@$(NORMAL_UNINSTALL)
1717+
@list='$(pkgsysconf_DATA)'; test -n "$(pkgsysconfdir)" || list=; \
1718+
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
1719+
dir='$(DESTDIR)$(pkgsysconfdir)'; $(am__uninstall_files_from_dir)
16431720

16441721
ID: $(am__tagged_files)
16451722
$(am__define_uniq_tagged_files); mkid -fID $$unique
@@ -1865,9 +1942,9 @@ distcleancheck: distclean
18651942
exit 1; } >&2
18661943
check-am: all-am
18671944
check: check-am
1868-
all-am: Makefile $(LIBRARIES) $(PROGRAMS)
1945+
all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(DATA)
18691946
installdirs:
1870-
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)"; do \
1947+
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(opendvlogdir)" "$(DESTDIR)$(pkgsysconfdir)"; do \
18711948
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
18721949
done
18731950
install: install-am
@@ -1928,7 +2005,7 @@ info: info-am
19282005

19292006
info-am:
19302007

1931-
install-data-am:
2008+
install-data-am: install-opendvlogDATA install-pkgsysconfDATA
19322009

19332010
install-dvi: install-dvi-am
19342011

@@ -1975,7 +2052,8 @@ ps: ps-am
19752052

19762053
ps-am:
19772054

1978-
uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS
2055+
uninstall-am: uninstall-binPROGRAMS uninstall-opendvlogDATA \
2056+
uninstall-pkgsysconfDATA uninstall-sbinPROGRAMS
19792057

19802058
.MAKE: install-am install-strip
19812059

@@ -1989,13 +2067,14 @@ uninstall-am: uninstall-binPROGRAMS uninstall-sbinPROGRAMS
19892067
html-am info info-am install install-am install-binPROGRAMS \
19902068
install-data install-data-am install-dvi install-dvi-am \
19912069
install-exec install-exec-am install-html install-html-am \
1992-
install-info install-info-am install-man install-pdf \
1993-
install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \
1994-
install-strip installcheck installcheck-am installdirs \
1995-
maintainer-clean maintainer-clean-generic mostlyclean \
1996-
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
1997-
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
1998-
uninstall-sbinPROGRAMS
2070+
install-info install-info-am install-man install-opendvlogDATA \
2071+
install-pdf install-pdf-am install-pkgsysconfDATA install-ps \
2072+
install-ps-am install-sbinPROGRAMS install-strip installcheck \
2073+
installcheck-am installdirs maintainer-clean \
2074+
maintainer-clean-generic mostlyclean mostlyclean-compile \
2075+
mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
2076+
uninstall-am uninstall-binPROGRAMS uninstall-opendvlogDATA \
2077+
uninstall-pkgsysconfDATA uninstall-sbinPROGRAMS
19992078

20002079
.PRECIOUS: Makefile
20012080

AnalogueRepeater/configure

-13
Original file line numberDiff line numberDiff line change
@@ -3783,19 +3783,6 @@ fi
37833783
37843784
37853785
3786-
# XXX These need to go away as non-standard paths
3787-
if test "x$prefix" = "xNONE"; then
3788-
prefix=""
3789-
bindir="/usr/bin"
3790-
fi
3791-
3792-
if test "x$datadir" = 'x${datarootdir}'; then
3793-
datadir="/home/opendv/data"
3794-
fi
3795-
if test "x$sysconfdir" = 'x${prefix}/etc'; then
3796-
sysconfdir="/home/opendv/analoguerepeater"
3797-
fi
3798-
37993786
38003787
# Check whether --with-gui was given.
38013788
if test "${with_gui+set}" = set; then :

AnalogueRepeater/configure.ac

-13
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,6 @@ m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
55

66
AM_MAINTAINER_MODE
77

8-
# XXX These need to go away as non-standard paths
9-
if test "x$prefix" = "xNONE"; then
10-
prefix=""
11-
bindir="/usr/bin"
12-
fi
13-
14-
if test "x$datadir" = 'x${datarootdir}'; then
15-
datadir="/home/opendv/data"
16-
fi
17-
if test "x$sysconfdir" = 'x${prefix}/etc'; then
18-
sysconfdir="/home/opendv/analoguerepeater"
19-
fi
20-
218
AC_ARG_WITH([gui],
229
[AS_HELP_STRING([--without-gui],
2310
[disable building the GUI programs])])

0 commit comments

Comments
 (0)