summaryrefslogtreecommitdiff
path: root/databases/shared-mime-info/mimedb.mk
blob: 5fb9f1bb1d41e2b5033459e741f9fdab82587e93 (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
# $NetBSD: mimedb.mk,v 1.4 2006/03/14 01:14:27 jlam Exp $
#
# This Makefile fragment is intended to be included by packages that install
# mime customization files.  It takes care of registering them in the global
# mime database.
#

.if !defined(SHARED_MIME_INFO_MIMEDB_MK)
SHARED_MIME_INFO_MIMEDB_MK=	# defined

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

INSTALL_TEMPLATE+=	${.CURDIR}/../../databases/shared-mime-info/files/install.tmpl
DEINSTALL_TEMPLATE+=	${.CURDIR}/../../databases/shared-mime-info/files/install.tmpl

FILES_SUBST+=		MIMEDB_PATH="${BUILDLINK_PREFIX.shared-mime-info}/share/mime"
FILES_SUBST+=		UPDATE_MIMEDB="${BUILDLINK_PREFIX.shared-mime-info}/bin/update-mime-database"

PRINT_PLIST_AWK+=	/^share\/mime\/packages/ { print; next; }
PRINT_PLIST_AWK+=	/^share\/mime\// { next; }
PRINT_PLIST_AWK+=	/^@dirrm share\/mime\/packages$$/ \
				{ print "@comment in shared-mime-info: " $$0; \
				  next; }
PRINT_PLIST_AWK+=	/^@dirrm share\/mime\// { next; }
PRINT_PLIST_AWK+=	/^@dirrm share\/mime$$/ { next; }

.include "../../databases/shared-mime-info/buildlink3.mk"

.endif	# SHARED_MIME_INFO_MIMEDB_MK