tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

generic fonts makefile fragment



Hi folks,

I have been using this very generic chunk of Makefile for more than one
package.  I suspect it will fit a few of them.

Does this sound good to add? thoughts?

A package like fonts/culmus or fonts/overpass looks like this:
# $NetBSD: Makefile,v 1.2 2019/03/05 21:17:17 tnn Exp $

DISTNAME=	Overpass-3.0.3
CATEGORIES=	fonts
MASTER_SITES=	${MASTER_SITE_GITHUB:=RedHatBrand/}

MAINTAINER=	maya%NetBSD.org@localhost
HOMEPAGE=	https://github.com/RedHatBrand/Overpass/
COMMENT=	Font family inspired by Highway Gothic
LICENSE=	ofl-v1.1 AND gnu-lgpl-v2.1

.include "../../mk/fonts.mk"
.include "../../mk/bsd.pkg.mk"


The fonts seem to be automatically picked up by my Xorg configuration
in this location.



Index: fonts.mk
===================================================================
RCS file: fonts.mk
diff -N fonts.mk
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ fonts.mk	5 Mar 2019 21:52:17 -0000
@@ -0,0 +1,22 @@
+# $NetBSD$
+#
+# Wrapper for installing fonts.
+#
+
+NO_CONFIGURE=	yes
+NO_BUILD=	yes
+
+TTF_FONTS_DIR=		${PREFIX}/share/fonts/X11/TTF
+OTF_FONTS_DIR=		${PREFIX}/share/fonts/X11/OTF
+
+INSTALLATION_DIRS=	${TTF_FONTS_DIR} ${OTF_FONTS_DIR}
+
+do-install:
+	for font in `find ${WRKSRC} -name '*.ttf'`; \
+	do \
+		${INSTALL_DATA} $${font} ${DESTDIR}${TTF_FONTS_DIR}; \
+	done; \
+	for font in `find ${WRKSRC} -name '*.otf'`; \
+	do \
+		${INSTALL_DATA} $${font} ${DESTDIR}${OTF_FONTS_DIR}; \
+	done;



Home | Main Index | Thread Index | Old Index