summaryrefslogtreecommitdiff
path: root/misc/xdg-dirs
diff options
context:
space:
mode:
Diffstat (limited to 'misc/xdg-dirs')
-rw-r--r--misc/xdg-dirs/Makefile22
-rw-r--r--misc/xdg-dirs/Makefile.common31
-rw-r--r--misc/xdg-dirs/dirs.mk28
3 files changed, 46 insertions, 35 deletions
diff --git a/misc/xdg-dirs/Makefile b/misc/xdg-dirs/Makefile
index 608e6d70cdf..6b1e0e65272 100644
--- a/misc/xdg-dirs/Makefile
+++ b/misc/xdg-dirs/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2004/03/08 19:27:53 jmmv Exp $
+# $NetBSD: Makefile,v 1.4 2004/04/14 15:26:41 jmmv Exp $
#
-DISTNAME= xdg-dirs-${XDG_DIRS_VERSION}
+DISTNAME= xdg-dirs-1.1
CATEGORIES= misc gnome kde
MASTER_SITES= # empty
DISTFILES= # empty
@@ -12,7 +12,21 @@ COMMENT= Shared XDG directories
CONFLICTS= gnome2-dirs<=1.2
-XDG_DIRS_REGISTER= yes
+NO_BUILD= # defined
+NO_BUILDLINK= # defined
+NO_CONFIGURE= # defined
+NO_CHECKSUM= # defined
+NO_EXTRACT= # defined
+USE_LANGUAGES= # empty
+USE_PKGINSTALL= yes
+WRKSRC= ${WRKDIR}
+
+.include "dirs.mk"
+.include "../../mk/bsd.prefs.mk"
+
+_SORTED!= ${ECHO} ${XDG_DIRS} | ${TR} -s ' \t' '\n' | ${SORT}
+MAKE_DIRS+= ${_SORTED:S/^/${PREFIX}\//}
+
+do-install: # nothing
-.include "Makefile.common"
.include "../../mk/bsd.pkg.mk"
diff --git a/misc/xdg-dirs/Makefile.common b/misc/xdg-dirs/Makefile.common
deleted file mode 100644
index e8ebcc7384a..00000000000
--- a/misc/xdg-dirs/Makefile.common
+++ /dev/null
@@ -1,31 +0,0 @@
-# $NetBSD: Makefile.common,v 1.1 2004/03/08 19:27:53 jmmv Exp $
-#
-
-XDG_DIRS_VERSION= 1.1
-
-WRKSRC= ${WRKDIR}
-USE_LANGUAGES= # empty
-USE_PKGINSTALL= yes
-NO_EXTRACT= # defined
-NO_CHECKSUM= # defined
-NO_BUILDLINK= # defined
-NO_CONFIGURE= # defined
-NO_BUILD= # defined
-
-XDG_DIRS+= share/application-registry
-XDG_DIRS+= share/applications
-XDG_DIRS+= share/icons
-XDG_DIRS+= share/images
-XDG_DIRS+= share/mime-info
-XDG_DIRS+= share/pixmaps
-XDG_DIRS+= share/sounds
-XDG_DIRS+= share/themes
-
-.include "../../mk/bsd.prefs.mk"
-
-.if ${XDG_DIRS_REGISTER} == "yes"
-_SORTED!= ${ECHO} ${XDG_DIRS} | ${TR} -s ' \t' '\n' | ${SORT}
-MAKE_DIRS+= ${_SORTED:S/^/${PREFIX}\//}
-.endif
-
-do-install: # nothing
diff --git a/misc/xdg-dirs/dirs.mk b/misc/xdg-dirs/dirs.mk
new file mode 100644
index 00000000000..a41af4d74df
--- /dev/null
+++ b/misc/xdg-dirs/dirs.mk
@@ -0,0 +1,28 @@
+# $NetBSD: dirs.mk,v 1.1 2004/04/14 15:26:41 jmmv Exp $
+#
+# This file is intended to be included by mk/dirs.mk, not directly by packages.
+#
+
+.if !defined(DIRS_XDG_MK)
+DIRS_XDG_MK= # defined
+
+XDG_DIRS= share/application-registry
+XDG_DIRS+= share/applications
+XDG_DIRS+= share/icons
+XDG_DIRS+= share/images
+XDG_DIRS+= share/mime-info
+XDG_DIRS+= share/pixmaps
+XDG_DIRS+= share/sounds
+XDG_DIRS+= share/themes
+
+.if defined(_USE_XDG_DIRS) && !empty(_USE_XDG_DIRS)
+DEPENDS+= xdg-dirs>=${_USE_XDG_DIRS}:../../misc/xdg-dirs
+
+. for dir in ${XDG_DIRS}
+PRINT_PLIST_AWK+= /^@dirrm ${dir:S|/|\\/|g}$$/ \
+ { print "@comment in xdg-dirs: " $$0; next; }
+. endfor
+. undef dir
+.endif
+
+.endif # !defined(DIRS_XDG_MK)