-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile
44 lines (35 loc) · 1.23 KB
/
Makefile
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
38
39
40
41
42
43
44
# whatmp3 - audio transcoder and torrent creator
# See LICENSE file for copyright and license details.
include config.mk
SRC = whatmp3.py
OBJ = ${SRC:.py=}
all: whatmp3
whatmp3: $@
@echo cp ${SRC} ${OBJ}
@cp ${SRC} ${OBJ}
clean:
@echo cleaning
@rm -f whatmp3 ${OBJ} whatmp3-${VERSION}.tar.gz
dist: clean
@echo creating dist tarball
@mkdir -p whatmp3-${VERSION}
@cp -R LICENSE Makefile README.md config.mk \
whatmp3.1 ${SRC} whatmp3-${VERSION}
@tar -cf whatmp3-${VERSION}.tar whatmp3-${VERSION}
@gzip whatmp3-${VERSION}.tar
@rm -rf whatmp3-${VERSION}
install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f whatmp3 ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/whatmp3
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@sed "s/VERSION/${VERSION}/g" < whatmp3.1 > ${DESTDIR}${MANPREFIX}/man1/whatmp3.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/whatmp3.1
uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin
@rm -f ${DESTDIR}${PREFIX}/bin/whatmp3
@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
@rm -f ${DESTDIR}${MANPREFIX}/man1/whatmp3.1
.PHONY: all clean dist install uninstall