Skip to content

Commit

Permalink
install the desktop file
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hall <hsw@ms2.hinet.net>
  • Loading branch information
hxw committed Nov 10, 2015
1 parent b211fe1 commit cedf658
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
1 change: 1 addition & 0 deletions Makefile → BSDmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PROGRAM = Conlecterm

# need to include gtk2hs
USE_GTK = YES
HAS_DESKTOP_FILE = YES

# a default agument list for run - averride as required
PROG_ARGS ?= -c .
Expand Down
3 changes: 2 additions & 1 deletion Conlecterm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ build-type: Simple
extra-source-files:
README.md
LICENSE.text
conlecterm.desktop
Conlecterm.desktop
config.rc

Executable Conlecterm
main-is: Main.hs
Expand Down
File renamed without changes.
17 changes: 13 additions & 4 deletions Mk/haskell.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ PROG_ARGS ?= -v -c ${PROGRAM}.conf
# default location of cabal built binary
PROG_BIN ?= ./dist/build/${PROGRAM}/${PROGRAM}

# desktop file
HAS_DESKTOP_FILE ?= NO
PROG_DESKTOP ?= ${PROGRAM}.desktop

# installation directory
INSTALL_DIR ?= ${HOME}/bin

Expand Down Expand Up @@ -54,11 +58,16 @@ deps: ${CABAL_FILE}
cabal install --only-dependencies

# install the application binary
.PHONY: install
install:
.PHONY: install pre-install do-install post-install
install: pre-install do-install post-install
pre-install:
do-install:
@[ -d '${INSTALL_DIR}' ] || ${SAY} 'missing directory: ${INSTALL_DIR}' || exit 1
${INSTALL_PROGRAM} '${PROG_BIN}' '${INSTALL_DIR}/${PROGRAM}'

.if "YES" == "${HAS_DESKTOP_FILE}"
${INSTALL_PROGRAM} '${PROG_DESKTOP}' '${INSTALL_DIR}/${PROGRAM}'
.endif
post-install:

# install sandbox if not already installed and build
.PHONY: sandbox-init
Expand All @@ -74,7 +83,7 @@ ${CABAL_SANDBOX}:
cabal update
cabal install alex
cabal install happy
.if YES == ${USE_GTK}
.if "YES" == "${USE_GTK}"
cabal install gtk2hs-buildtools
.endif

Expand Down

0 comments on commit cedf658

Please sign in to comment.