From c4a6dca51f322e1f2057d471799bbfcd7ee5b4cd Mon Sep 17 00:00:00 2001 From: scheidell Date: Wed, 4 Jul 2012 21:53:36 +0000 Subject: - Enable PAM in slim (OPTION on by default) - Install pam config file for "slim". - Patch app.cpp to allow rebooting without login - Modify rc.d script to start after hal - Bump PORTREVISION PR: ports/168841 Reported by: Volodymyr Kostyrko Approved by: Henry Hu (maintainer) Obtained from: http://www.freebsd.org/cgi/query-pr.cgi?pr=152236 --- x11/slim/Makefile | 28 ++++++++++++++++++++++------ x11/slim/files/pam.conf | 4 ++++ x11/slim/files/slim.sh.in | 2 +- x11/slim/pkg-plist | 3 +++ 4 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 x11/slim/files/pam.conf (limited to 'x11/slim') diff --git a/x11/slim/Makefile b/x11/slim/Makefile index f9fec76d7fdf..8ce42a8801e7 100644 --- a/x11/slim/Makefile +++ b/x11/slim/Makefile @@ -6,7 +6,7 @@ PORTNAME= slim PORTVERSION= 1.3.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11 MASTER_SITES= http://slim.berlios.de/releases/ DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.release.asc @@ -15,14 +15,14 @@ EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= henry.hu.sh@gmail.com COMMENT= Graphical login manager for X11, derived from Login.app +LICENSE= GPLv2 + LIB_DEPENDS= jpeg.11:${PORTSDIR}/graphics/jpeg \ ck-connector.0:${PORTSDIR}/sysutils/consolekit \ png15:${PORTSDIR}/graphics/png \ freetype:${PORTSDIR}/print/freetype2 \ fontconfig:${PORTSDIR}/x11-fonts/fontconfig -LICENSE= GPLv2 - USE_CMAKE= yes USE_XORG= x11 xft xmu xorg-server xrender USE_GL= glut @@ -33,8 +33,18 @@ CMAKE_ARGS= -DUSE_CONSOLEKIT=yes MAN1= slim.1 +OPTIONS= PAM "Use pam" off + .include +.if defined(WITH_PAM) +CMAKE_ARGS+= -DUSE_PAM=yes +PLIST_SUB+= PAM="" +.else +CMAKE_ARGS+= -DUSE_PAM=no +PLIST_SUB+= PAM="@comment " +.endif + verify: checksum gpg --verify ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}.release.asc @@ -49,15 +59,21 @@ post-patch: # Fix a previous bad install pre-install: - @/bin/rm -f ${LOCALBASE}/share/man/man1/slim.1 - @/bin/rmdir ${LOCALBASE}/share/man/man1 2>/dev/null || true - @/bin/rmdir ${LOCALBASE}/share/man 2>/dev/null || true + @${RM} -f ${LOCALBASE}/share/man/man1/slim.1 + @${RMDIR} ${LOCALBASE}/share/man/man1 2>/dev/null || true + @${RMDIR} ${LOCALBASE}/share/man 2>/dev/null || true post-install: @${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MAN1PREFIX}/man/man1 @if [ ! -f ${PREFIX}/etc/slim.conf ]; then \ ${CP} ${PREFIX}/etc/slim.conf.sample ${PREFIX}/etc/slim.conf ; \ fi +. if defined(WITH_PAM) + @${INSTALL_DATA} ${FILESDIR}/pam.conf ${PREFIX}/etc/pam.d/slim.default + @if [ ! -f ${PREFIX}/etc/pam.d/slim ]; then \ + ${CP} ${PREFIX}/etc/pam.d/slim.default ${PREFIX}/etc/pam.d/slim ; \ + fi +. endif @${CAT} ${PKGMESSAGE} .include diff --git a/x11/slim/files/pam.conf b/x11/slim/files/pam.conf new file mode 100644 index 000000000000..679bb26fc00b --- /dev/null +++ b/x11/slim/files/pam.conf @@ -0,0 +1,4 @@ +auth include system +account include system +session include system +password include system diff --git a/x11/slim/files/slim.sh.in b/x11/slim/files/slim.sh.in index 3267e5d76295..6d9f378396d1 100644 --- a/x11/slim/files/slim.sh.in +++ b/x11/slim/files/slim.sh.in @@ -3,7 +3,7 @@ # $FreeBSD$ # # PROVIDE: slim -# REQUIRE: LOGIN dbus +# REQUIRE: LOGIN dbus hald # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable slim: diff --git a/x11/slim/pkg-plist b/x11/slim/pkg-plist index 279827a78b62..d4ac8c4cafce 100644 --- a/x11/slim/pkg-plist +++ b/x11/slim/pkg-plist @@ -8,6 +8,9 @@ bin/slim @unexec if cmp -s %D/etc/slim.conf.sample %D/etc/slim.conf; then rm -f %D/etc/slim.conf; fi etc/slim.conf.sample @exec if [ ! -f %D/etc/slim.conf ] ; then cp -p %D/%F %B/slim.conf; fi +%%PAM%%@unexec if cmp -s %D/etc/pam.d/slim.default %D/etc/pam.d/slim; then rm -f %D/etc/pam.d/slim ; fi +%%PAM%%etc/pam.d/slim.default +%%PAM%%@exec if [ ! -f %D/etc/pam.d/slim ] ; then cp -p %D/%F %B/slim; fi @exec /bin/rm -f %D/share/man/man1/slim.1 @exec rmdir "%D/share/man/man1" 2>/dev/null || true @exec rmdir "%D/share/man" 2>/dev/null || true -- cgit