2021-04-08 16:53:19 -04:00
|
|
|
if COND_LIBRESPOTC
|
|
|
|
LIBRESPOTC_SUBDIR=src/inputs/librespot-c
|
|
|
|
endif
|
|
|
|
|
2010-06-21 11:50:09 -04:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
2009-04-01 12:59:32 -04:00
|
|
|
|
2021-04-09 13:43:43 -04:00
|
|
|
RPM_SPEC_FILE = owntone.spec
|
|
|
|
CONF_FILE = owntone.conf
|
|
|
|
SYSTEMD_SERVICE_FILE = owntone.service
|
2021-11-25 16:11:59 -05:00
|
|
|
SYSTEMD_TSERVICE_FILE = owntone@.service
|
2016-12-27 18:47:00 -05:00
|
|
|
|
2021-06-14 16:39:14 -04:00
|
|
|
if COND_INSTALL_SYSTEMD
|
|
|
|
systemddir = $(SYSTEMD_DIR)
|
2021-11-25 16:11:59 -05:00
|
|
|
systemd_DATA = $(SYSTEMD_SERVICE_FILE) $(SYSTEMD_TSERVICE_FILE)
|
2021-06-14 16:39:14 -04:00
|
|
|
endif
|
2016-12-27 18:47:00 -05:00
|
|
|
|
2021-11-25 16:11:59 -05:00
|
|
|
BUILT_SOURCES = $(CONF_FILE) $(SYSTEMD_SERVICE_FILE) $(SYSTEMD_TSERVICE_FILE)
|
2009-06-12 05:38:46 -04:00
|
|
|
|
2021-04-08 16:53:19 -04:00
|
|
|
SUBDIRS = $(LIBRESPOTC_SUBDIR) sqlext src htdocs
|
2009-09-21 15:26:21 -04:00
|
|
|
|
2021-04-09 13:43:43 -04:00
|
|
|
dist_man_MANS = owntone.8
|
2016-12-27 18:32:08 -05:00
|
|
|
|
|
|
|
nobase_dist_doc_DATA = \
|
|
|
|
UPGRADING \
|
|
|
|
README.md \
|
2022-03-20 07:36:25 -04:00
|
|
|
docs/index.md \
|
|
|
|
docs/documentation.md \
|
|
|
|
docs/installation.md \
|
|
|
|
docs/outputs-pulse.md \
|
|
|
|
docs/outputs-alsa.md \
|
|
|
|
docs/smart-playlists.md \
|
|
|
|
docs/web-interface.md \
|
|
|
|
docs/radio-streams.md \
|
2016-12-27 18:32:08 -05:00
|
|
|
scripts/pairinghelper.sh
|
|
|
|
|
|
|
|
EXTRA_DIST = \
|
2016-12-27 18:47:00 -05:00
|
|
|
$(CONF_FILE).in \
|
2016-12-27 18:57:41 -05:00
|
|
|
$(SYSTEMD_SERVICE_FILE).in \
|
2021-11-25 16:11:59 -05:00
|
|
|
$(SYSTEMD_TSERVICE_FILE).in \
|
2016-12-27 18:57:41 -05:00
|
|
|
$(RPM_SPEC_FILE)
|
2009-09-21 15:26:21 -04:00
|
|
|
|
2010-09-04 05:53:29 -04:00
|
|
|
install-data-hook:
|
2017-06-30 14:27:48 -04:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/log"
|
2018-03-04 11:41:18 -05:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/run"
|
2021-06-14 16:39:14 -04:00
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/$(PACKAGE)"
|
|
|
|
if COND_INSTALL_USER
|
|
|
|
( $(GETENT) group $(OWNTONE_GROUP) &> /dev/null || $(GROUPADD) --system $(OWNTONE_GROUP) )
|
|
|
|
( $(GETENT) passwd $(OWNTONE_USER) &> /dev/null || $(USERADD) --system --no-create-home --gid $(OWNTONE_GROUP) --groups audio --shell /usr/sbin/nologin $(OWNTONE_USER) )
|
|
|
|
( ! $(GETENT) group pulse-access &> /dev/null || $(USERMOD) --append --groups pulse-access $(OWNTONE_USER) )
|
|
|
|
$(CHOWN) $(OWNTONE_USER).$(OWNTONE_GROUP) "$(DESTDIR)$(localstatedir)/cache/$(PACKAGE)"
|
|
|
|
endif
|
|
|
|
if COND_LIBSPOTIFY
|
|
|
|
$(MKDIR_P) "$(DESTDIR)$(localstatedir)/cache/$(PACKAGE)/libspotify"
|
|
|
|
endif
|
|
|
|
# we do this manually instead of using sysconf_DATA because it overwrites existing config
|
|
|
|
if COND_INSTALL_CONF_FILE
|
|
|
|
$(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
|
|
|
|
[ -f $(DESTDIR)$(sysconfdir)/$(CONF_FILE) ] || $(INSTALL_DATA) $(CONF_FILE) $(DESTDIR)$(sysconfdir)/$(CONF_FILE)
|
|
|
|
endif
|
|
|
|
|
|
|
|
uninstall-hook:
|
|
|
|
( cd "$(DESTDIR)$(localstatedir)/cache" && rm -rf $(PACKAGE) )
|
|
|
|
( cd "$(DESTDIR)$(localstatedir)/log" && rm -f "$(PACKAGE).log*" )
|
|
|
|
( cd "$(DESTDIR)$(localstatedir)/run" && rm -f "$(PACKAGE).pid" )
|
|
|
|
if COND_INSTALL_USER
|
|
|
|
( ! $(GETENT) passwd $(OWNTONE_USER) &> /dev/null || $(USERDEL) $(OWNTONE_USER) )
|
|
|
|
endif
|
|
|
|
if COND_INSTALL_CONF_FILE
|
|
|
|
( cd "$(DESTDIR)$(sysconfdir)" && rm -f $(CONF_FILE) )
|
|
|
|
endif
|
2010-09-04 05:53:29 -04:00
|
|
|
|
2016-12-27 18:47:00 -05:00
|
|
|
CLEANFILES = $(BUILT_SOURCES)
|
|
|
|
|
2017-01-06 03:44:18 -05:00
|
|
|
do_subst = $(SED) -e 's|@sbindir[@]|$(sbindir)|g' \
|
2016-12-27 18:47:00 -05:00
|
|
|
-e 's|@localstatedir[@]|$(localstatedir)|g' \
|
|
|
|
-e 's|@PACKAGE[@]|$(PACKAGE)|g' \
|
2021-04-09 13:43:43 -04:00
|
|
|
-e 's|@OWNTONE_USER[@]|$(OWNTONE_USER)|g'
|
2016-12-27 18:47:00 -05:00
|
|
|
|
|
|
|
# these files use $prefix, which is determined at build (not configure) time
|
2021-11-25 16:11:59 -05:00
|
|
|
$(CONF_FILE) $(SYSTEMD_SERVICE_FILE) $(SYSTEMD_TSERVICE_FILE): Makefile
|
2016-12-27 18:47:00 -05:00
|
|
|
$(AM_V_at)rm -f $@ $@-t
|
|
|
|
$(AM_V_GEN)$(do_subst) "$(srcdir)/$@.in" > $@-t
|
|
|
|
$(AM_V_at)mv $@-t $@
|
|
|
|
|
|
|
|
$(CONF_FILE): $(srcdir)/$(CONF_FILE).in
|
|
|
|
|
|
|
|
$(SYSTEMD_SERVICE_FILE): $(srcdir)/$(SYSTEMD_SERVICE_FILE).in
|
2021-11-25 16:11:59 -05:00
|
|
|
|
|
|
|
$(SYSTEMD_TSERVICE_FILE): $(srcdir)/$(SYSTEMD_TSERVICE_FILE).in
|