Using INSTALL_DATA to install header files to PREFIX/include/PORTNAME

Marcel Bonnet marcelbonnet at gmail.com
Fri Oct 28 20:14:40 UTC 2016


Hello, porters!

I've been reading the Porters Handbook, even the bsd.*.mk files... but
I'm wondering: why the waf installer put all the installation files
into STAGEDIR but the port system do not copy them all, just some of
them to the PREFIX.

Below the Makefile and pkg-plist.

If do not type
${INSTALL_DATA} ${STAGEDIR}${PREFIX}/include/sord-0/sord/sord.h
${STAGEDIR}${PREFIX}/include/sord-0/sord/
them the this header is not copied to PREFIX. But the other files are
installed normally .

So, I don't understand why I have to say ${INSTALL_DATA} the file from
and to its current directory. Am I'm doing something really wrong, but
perhaps produced the desired effect? Now its working like a charm.


The Makefile :

do-install:
(cd ${WRKSRC}/build && ${INSTALL_DATA} sord-0.pc \
   ${STAGEDIR}${PREFIX}/libdata/pkgconfig)
${REINPLACE_CMD} "s,^prefix=.*,prefix=${PREFIX},"
${STAGEDIR}${PREFIX}/libdata/pkgconfig/sord-0.pc
${RM} ${STAGEDIR}${PREFIX}/libdata/pkgconfig/sord-0.pc.bak
(cd ${WRKSRC} && ${WAF_CMD} install)
${INSTALL_DATA} ${STAGEDIR}${PREFIX}/include/sord-0/sord/sord.h
${STAGEDIR}${PREFIX}/include/sord-0/sord/
${INSTALL_DATA} ${STAGEDIR}${PREFIX}/include/sord-0/sord/sordmm.hpp
${STAGEDIR}${PREFIX}/include/sord-0/sord/
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sordi
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/sord_validate
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libsord-0.so.0.12.2


$ cat pkg-plist
bin/sordi
bin/sord_validate
include/sord-0/sord/sord.h
include/sord-0/sord/sordmm.hpp
lib/libsord-0.so
lib/libsord-0.so.0
lib/libsord-0.so.0.12.2
libdata/pkgconfig/sord-0.pc
man/man1/sordi.1.gz
man/man1/sord_validate.1.gz


The complete files are here:
https://github.com/marcelbonnet/freebsd-ports/tree/ardour5.3/textproc/sord-0

Thanks,

-- 
Marcel Bonnet
github.com/marcelbonnet/


More information about the freebsd-ports mailing list