Pull up
[pkgsrcv2.git] / x11 / kdebase3 / Makefile
1 # $NetBSD: Makefile,v 1.3 2002/07/17 07:54:06 skrll Exp $
2
3 DISTNAME=       kdebase-3.0.2
4 PKGREVISION=    1
5 CATEGORIES=     x11
6 COMMENT=        Base modules for the KDE 3 integrated X11 desktop
7
8 .include "../../x11/kde3/Makefile.kde3"
9
10 DISTFILES=      ${DISTNAME}${EXTRACT_SUFX} Daemon.png Daemon.README
11
12 EXTRACT_ONLY=   ${DISTNAME}${EXTRACT_SUFX}
13
14 USE_BUILDLINK_ONLY=     YES
15
16 CONFIGURE_ARGS+=        --with-ssl-dir="${BUILDLINK_DIR}"
17 CONFIGURE_ARGS+=        --without-pam
18 CONFIGURE_ARGS+=        --without-cdparanoia
19 CONFIGURE_ARGS+=        --without-lame
20 CONFIGURE_ARGS+=        --without-vorbis
21
22 .include "../../mk/bsd.prefs.mk"
23
24 .if ${OPSYS} == "NetBSD"
25 LIBS+=                  -Wl,--export-dynamic
26 .endif
27
28 PLIST_SRC=              ${WRKDIR}/PLIST.Xdpms
29
30 .if ${OPSYS} == "Linux"
31 KDE3_NSPLUGINS?=        YES
32 .else
33 KDE3_NSPLUGINS?=        NO
34 .endif
35 BUILD_DEFS+=            KDE3_NSPLUGINS
36
37 .if ${KDE3_NSPLUGINS} == "YES"
38 PLIST_SRC+=             ${PKGDIR}/PLIST.nsplugins
39 CONFIGURE_ARGS+=        --with-motif-includes="${BUILDLINK_DIR}/include"
40 CONFIGURE_ARGS+=        --with-motif-libraries="${BUILDLINK_DIR}/lib"
41 .include "../../mk/motif.buildlink.mk"
42 .else
43 CONFIGURE_ARGS+=        --without-motif
44 .endif
45
46 _KDE3_EXTRA_INCLUDES=   ${BUILDLINK_DIR}/include:${BUILDLINK_X11_DIR}/include:${BUILDLINK_DIR}/include/freetype2
47
48 # Don't execute kappfinder_install at install-time.  This causes random
49 # applications to be found which causes random .desktop files to be created
50 # in the applnk directory.
51 #
52 CONFIGURE_ENV+=         RUN_KAPPFINDER=no
53
54 PLIST_SRC+=             ${PKGDIR}/PLIST
55
56 ICONDIR=                share/kde/icons
57
58 post-build:
59         cd ${WRKSRC};                                                   \
60         files="kioslave/info/kde-info2html.conf";                       \
61         for file in $${files}; do                                       \
62                 ${SED}  -e "s|@LOCALBASE@|${LOCALBASE}|"                \
63                         $${file} > $${file}.new;                        \
64                 ${MV} -f $${file}.new $${file};                         \
65         done
66
67 post-install:
68         ${INSTALL_DATA_DIR} ${PREFIX}/share/kde/templates/.source/emptydir
69         ${INSTALL_DATA} ${DISTDIR}/Daemon.png ${PREFIX}/${ICONDIR}
70         ${INSTALL_DATA} ${DISTDIR}/Daemon.README                        \
71                 ${PREFIX}/share/doc/kde/HTML/en/kdm
72
73         @# Several programs need to be setuid-root, but due to the way that
74         @# KDE3 finds executables, the files must have their read bit set
75         @# so that KStandardDir::findResource() will find them
76         @#
77         suid_progs="                                                    \
78                 bin/konsole_grantpty                                    \
79                 bin/kcheckpass                                          \
80                 bin/ksysguardd                                          \
81         ";                                                              \
82         for prog in $${suid_progs}; do                                  \
83                 ${CHMOD} 4755 ${PREFIX}/$${prog};                       \
84         done
85
86         @# The global desktop template files need to be user-writeable, or
87         @# else users won't be able to alter them after copying them to 
88         @# their local directories.
89         @#
90         ${CHMOD} u+w ${PREFIX}/share/kde/templates/.source/*
91
92         @# On some systems, the Xdpms routines aren't available in a shared
93         @# library, and some libraries aren't created as a result.
94         @#
95         ( files="                                                       \
96                 lib/kde3/libkcm_energy.so                               \
97                 lib/kde3/libkcm_screensaver.so                          \
98           ";                                                            \
99           for file in $${files}; do                                     \
100                 if [ -f ${PREFIX}/$${file} ]; then                      \
101                         ${ECHO} "$${file}";                             \
102                 fi;                                                     \
103           done;                                                         \
104         ) > ${WRKDIR}/PLIST.Xdpms
105
106 .if ${OPSYS} == "NetBSD"
107         @# NetBSD Advertisement O:-)
108         cd ${PREFIX}/share/kde/config/kdm;                              \
109         ${SED} -e 's|^#\(LogoPixmap\)=.*|\1=${PREFIX}/${ICONDIR}/Daemon.png|' \
110                 kdmrc > ${WRKDIR}/kdmrc.ad;                             \
111         ${CP} -f ${WRKDIR}/kdmrc.ad kdmrc
112 .endif
113
114 .include "../../databases/openldap/buildlink.mk"
115 .include "../../graphics/freetype2/buildlink.mk"
116 .include "../../x11/qt3-tools/buildlink.mk"
117 .include "../../x11/kde3/buildlink.mk"
118 .include "../../x11/kdelibs3/buildlink.mk"
119 .include "../../mk/x11.buildlink.mk"
120 .include "../../mk/bsd.pkg.mk"