diff options
author | B Stack <bgstack15@gmail.com> | 2020-09-29 21:05:42 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-09-29 21:05:42 -0400 |
commit | 5a757b0f96c60e3d894e8c5a9fd335f91fffb7f9 (patch) | |
tree | d57d6e4e1e63641bfc41d6659516d82c2e24d568 /src/Makefile | |
parent | WIP: fixing initialize for packaging process (diff) | |
download | myautomount-5a757b0f96c60e3d894e8c5a9fd335f91fffb7f9.tar.gz myautomount-5a757b0f96c60e3d894e8c5a9fd335f91fffb7f9.tar.bz2 myautomount-5a757b0f96c60e3d894e8c5a9fd335f91fffb7f9.zip |
WIP: improve rpm packaging, fix desktop files
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile index ef66dfe..58f89c5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -41,6 +41,7 @@ findbin :=$(shell which find) grepbin :=$(shell which grep) gzipbin :=$(shell which gzip) installbin :=$(shell which install) +lnbin :=$(shell which ln) rmbin :=$(shell which rm) rmdirbin :=$(shell which rmdir) sedbin :=$(shell which sed) @@ -52,6 +53,8 @@ xargsbin :=$(shell which xargs) with_man ?= YES +APPSDIR_SHORT := $(shell ${echobin} "${APPSDIR}" | ${sedbin} -r -e "s:$(DESTDIR)/?::" ) + all: build_man ifeq ($(with_man),YES) @@ -80,7 +83,9 @@ install_files: @ls usr/share/man/man*/*gz 1>/dev/null 2>&1 && echo "Including man pages." || : @${echobin} Installing files to ${DESTDIR} for td in $$( ${findbin} ${SRCDIR} -type d ! -name '.*.swp' ! -name 'Makefile' -printf '%P\n' | ${sedbin} -r -e "s:etc/sysconfig:${DEFAULTDIR}:" -e "s:${DESTDIR}/?::" ) ; do ${installbin} -m0755 -d ${DESTDIR}/$${td} ; done - for tf in $$( ${findbin} ${SRCDIR} ! -type d ! -name '.*.swp' ! -name 'Makefile' ! \( -path '*/man/*' -name '*.txt' \) ! -path '*/sysconfig/*' -printf '%P\n' ) ; do MODE=0644 ; echo "$${tf}" | grep -qE "(bin|libexec|deprecated)\/" && MODE=0755 ; ${installbin} -m$${MODE} ${SRCDIR}/$${tf} ${DESTDIR}/$${tf} ; done + for tf in $$( ${findbin} ${SRCDIR} ! -type d ! -type l ! -name '.*.swp' ! -name 'Makefile' ! \( -path '*/man/*' -name '*.txt' \) ! -path '*/sysconfig/*' -printf '%P\n' ) ; do MODE=0644 ; echo "$${tf}" | grep -qE "(bin|libexec|deprecated)\/" && MODE=0755 ; ${installbin} -m$${MODE} ${SRCDIR}/$${tf} ${DESTDIR}/$${tf} ; done + ${lnbin} -s ../../../${APPSDIR_SHORT}/myautomountd.desktop ${XDGAUTODIR}/myautomountd.desktop + ${lnbin} -s ../../../${APPSDIR_SHORT}/myautomount-trayicon.desktop ${XDGAUTODIR}/myautomount-trayicon.desktop MAN_TXT:=$(wildcard usr/share/man/man*/*.txt) MAN_GZ:= $(subst .txt,.gz,$(MAN_TXT)) |