File: Makefile

package info (click to toggle)
profile-cleaner 2.45-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 112 kB
  • sloc: sh: 387; makefile: 38
file content (37 lines) | stat: -rw-r--r-- 920 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
VERSION = 2.45
PN = profile-cleaner

PREFIX ?= /usr
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man/man1
ZSHDIR = $(PREFIX)/share/zsh/site-functions

RM = rm
SED = sed

all:
	@echo -e '\033[1;32mSetting version\033[0m'
	@sed 's/@VERSION@/'$(VERSION)'/' common/$(PN).in > common/$(PN)

install-bin:
	@echo -e '\033[1;32mInstalling main script, initd and config...\033[0m'
	install -Dm755 common/$(PN) "$(DESTDIR)$(BINDIR)/$(PN)"
	ln -s $(PN) "$(DESTDIR)$(BINDIR)/pc"
	install -d "$(DESTDIR)$(ZSHDIR)"
	install -m644 common/zsh-completion "$(DESTDIR)/$(ZSHDIR)/_pc"

install-man:
	@echo -e '\033[1;32mInstalling manpage...\033[0m'
	install -Dm644 doc/pc.1 "$(DESTDIR)$(MANDIR)/pc.1"

uninstall:
	$(RM) "$(DESTDIR)$(BINDIR)/$(PN)"
	$(RM) "$(DESTDIR)$(BINDIR)/pc"
	$(RM) "$(DESTDIR)/$(ZSHDIR)/_pc"

install: install-bin install-man

clean:
	$(RM) -f common/$(PN)

.PHONY: install-bin install-man uninstall install clean