Skip to content

Commit

Permalink
Makefile fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
gpicchiarelli committed Aug 17, 2019
1 parent 883c347 commit 0e56d49
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

SUBDIR= src man

PREFIX?=${LOCALBASE}/usr/sbin/
BINDIR?=${PREFIX}

MANDIR=${LOCALBASE}/usr/share/man/man8
MAN=${DAEMON_NAME}.8
MAN?=${DAEMON_NAME}.8

.include <bsd.subdir.mk>
6 changes: 3 additions & 3 deletions man/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.include<../mkinfo.mk>

realinstall:
cp ${DAEMON_NAME}.8 ${MANDIR}/${DAEMON_NAME}.8
cp ${DAEMON_NAME}.8 ${MANDIR}${DAEMON_NAME}.8
makewhatis ${LOCALBASE}/usr/share/man

clean:
rm ${MANDIR}/${DAEMON_NAME}.8
makewhatis ${LOCALBASE}/${MANDIR}
rm ${MANDIR}${DAEMON_NAME}.8
makewhatis ${LOCALBASE}${MANDIR}

.include <bsd.man.mk>
.include <bsd.subdir.mk>
10 changes: 6 additions & 4 deletions mkinfo.mk
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
NAME= macrandr
DAEMON_NAME=${NAME}d

MAINTAINER= Giacomo Picchiarelli <[email protected]>
COMMENT= A daemon to change periodically MAC addresses
V= 0.1.0
PKGNAME= ${DAEMON_NAME}-${V}
DISTNAME= ${DAEMON_NAME}.${V}

LOCAL_DAEMON_FILE= /etc/rc.conf.local
HOMEPAGE= https://github.com/gpicchiarelli/${NAME}
MASTER_SITE= https://github.com/gpicchiarelli/${NAME}

PREFIX=${LOCALBASE}/usr
BINDIR=${PREFIX}/sbin/

MANDIR=${LOCALBASE}${PREFIX}/share/man/man8/

CFLAGS+= -fstack-protector-all
CFLAGS+= -Wunused-variable
Expand Down
6 changes: 3 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ ${NAME}.o: ${NAME}.c

realinstall: all
cp ${DAEMON_NAME} ${LOCALBASE}/etc/rc.d/${DAEMON_NAME}
cp ${NAME} ${LOCALBASE}/usr/sbin/${NAME}
cp ${NAME} ${LOCALBASE}${BINDIR}${NAME}
chmod 0555 ${LOCALBASE}/etc/rc.d/${DAEMON_NAME}
chmod 0555 ${LOCALBASE}/usr/sbin/${NAME}
chmod 0555 ${LOCALBASE}${BINDIR}${NAME}
rcctl enable ${DAEMON_NAME}
rcctl start ${DAEMON_NAME}

Expand All @@ -29,6 +29,6 @@ clean:
rcctl stop ${DAEMON_NAME}
rcctl disable ${DAEMON_NAME}
rm ${LOCALBASE}/etc/rc.d/${DAEMON_NAME}
rm ${LOCALBASE}/usr/sbin/${NAME}
rm ${LOCALBASE}${BINDIR}${NAME}

.include <bsd.prog.mk>

0 comments on commit 0e56d49

Please sign in to comment.