pkgsrc-Users archive

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

Re: Config files in PLIST



On Mon, 18 Jul 2022, Thomas Klausner wrote:

> A template config file is fine, but you should make sure it is
> installed into ${PREFIX}/share/examples/${PKGNAME}, and copied to
> ${PKG_SYSCONFDIR} using the CONF_FILES framework you already found.
> 
> You can either do that by patching the build system to change the
> default installation path for the file, but that often has the
> downside that the same path is used for looking for the file, which we
> don't want to change; or by moving the file in the correct location
> using a post-install target (be sure to use
> ${DESTDIR}${PREFIX}... paths).

I followed your advice, and I did:
...
CONF_FILES+=		${PREFIX}/share/examples/${PKGNAME}/config ${PKG_SYSCONFDIR}/openfortivpn/config
...
post-install:
	set -e && mkdir -p ${DESTDIR}${PREFIX}/share/examples/${PKGNAME} && mv ${DESTDIR}${PKG_SYSCONFBASE}/openfortivpn/config ${DESTDIR}${PREFIX}/share/examples/${PKGNAME}/config

It seems it solves my problem, thanks a lot! :-)

-- 
Francisco J. Tsao Santín
http://gattaca.es
1024D/71CF4D62  42 F1 53 35 EF 98 98 8A FC 6C 56 B3 4C A7 7D FB


Home | Main Index | Thread Index | Old Index