Use cairosvg rather than librsvg to convert SVG to PNG.
[dhcpcd-ui] / mk / icon.mk
1 include ${MKDIR}/sys.mk
2
3 SIZEDIR?=       ${SIZE}x${SIZE}
4 ICONDIR?=       ${PREFIX}/share/dhcpcd/icons
5 IDIR=           ${ICONDIR}/hicolor/${SIZEDIR}/${CATEGORY}
6
7 CAIROSVG?=      cairosvg
8
9 ICONS+=         ${SRCS:.svg=.png}
10 CLEANFILES+=    ${SRCS:.svg=.png}
11
12 .SUFFIXES: .svg .png
13
14 all: ${ICONS}
15
16 .svg.png:
17         ${CAIROSVG} -f png -H ${SIZE} -W ${SIZE} $< >$@
18
19 _iconinstall: ${ICONS}
20         ${INSTALL} -d ${DESTDIR}${IDIR}
21         ${INSTALL} -m ${NONBINMODE} ${ICONS} ${DESTDIR}${IDIR}
22
23 proginstall:
24
25 install: _iconinstall
26
27 clean:
28         rm -f ${CLEANFILES}