summaryrefslogtreecommitdiff
path: root/x11/slock/Makefile
blob: 47f06eec89efde440be68d8be4aa183a67f7324f (plain)
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
# $NetBSD: Makefile,v 1.4 2012/05/23 17:10:50 reed Exp $

DISTNAME=		slock-1.0
CATEGORIES=		x11
MASTER_SITES=		http://dl.suckless.org/tools/

MAINTAINER=		reed@reedmedia.net
HOMEPAGE=		http://tools.suckless.org/slock
COMMENT=		Simple X11 screen locker
LICENSE=		mit

PKG_DESTDIR_SUPPORT=	user-destdir

NO_CONFIGURE=		yes
INSTALLATION_DIRS=	bin share/doc/slock

.include "../../mk/bsd.prefs.mk"

.if !(${OPSYS:M*BSD} != "" || ${OPSYS} == "Darwin" || ${OPSYS} == "DragonFly")
CFLAGS+=-DHAVE_SHADOW_H
.endif

# TODO: handle -lcrypt too
LIBS+=	-lcrypt

do-build:
	cd ${WRKSRC} && ${CC} -c -DVERSION=\"1.0\" ${CFLAGS} slock.c && \
		${CC} -o slock slock.o -lc ${LIBS} ${X11_LDFLAGS} -lX11

SPECIAL_PERMS+=	bin/slock ${SETUID_ROOT_PERMS}

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/slock ${DESTDIR}${PREFIX}/bin/
	${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/slock/

.include "../../x11/libX11/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"