diff --git a/Makefile b/Makefile index 67129291..73c9d571 100644 --- a/Makefile +++ b/Makefile @@ -78,3 +78,8 @@ install: ${PROG} find webui/static/ -type d |grep -v .svn | awk '{print "$(INSTSHARE)/"$$0}' | xargs mkdir -p find webui/static/ -type f |grep -v .svn | awk '{print $$0 " $(INSTSHARE)/"$$0}' | xargs -n2 cp + +uninstall: + rm -f $(INSTBIN)/${PROG} + rm -f $(INSTMAN)/${MAN} + rm -rf $(INSTSHARE) diff --git a/main.c b/main.c index d8f00ddc..11321dab 100644 --- a/main.c +++ b/main.c @@ -60,8 +60,8 @@ extern const char *htsversion_full; time_t dispatch_clock; static LIST_HEAD(, gtimer) gtimers; pthread_mutex_t global_lock; -const char *contentpath = HTS_INSTALL_PREFIX "/share/hts/tvheadend/"; +const char *contentpath = HTS_CONTENT_PATH "/tvheadend"; static void handle_sigpipe(int x) diff --git a/webui/webui.c b/webui/webui.c index 275826e0..ad26cb71 100644 --- a/webui/webui.c +++ b/webui/webui.c @@ -71,17 +71,13 @@ page_root(http_connection_t *hc, const char *remain, void *opaque) /** * Static download of a file from the filesystem */ -extern char *contentpath; static int page_static(http_connection_t *hc, const char *remain, void *opaque) { + extern char *contentpath; + int fd; -#ifdef HTS_BUILD_ROOT - const char *rootpath = HTS_BUILD_ROOT "/tvheadend"; -#else - const char *rootpath = contentpath; -#endif char path[500]; struct stat st; const char *content = NULL, *postfix; @@ -96,7 +92,7 @@ page_static(http_connection_t *hc, const char *remain, void *opaque) content = "text/javascript; charset=UTF-8"; } - snprintf(path, sizeof(path), "%s/webui/static/%s", rootpath, remain); + snprintf(path, sizeof(path), "%s/webui/static/%s", contentpath, remain); if((fd = open(path, O_RDONLY)) < 0) return 404;