Stuart Henderson wrote: > On 2021/07/12 00:43, Stefan Hagen wrote: >> Stuart Henderson wrote: >>> I think what's wanted here is probably to get rid of that patch and set >>> MAKE_FLAGS= ETCDIR=${SYSCONFDIR}/notion (used during build to tell the >>> program where to look for files at runtime ) and then FAKE_FLAGS= >>> ETCDIR=$(PREFIX)/share/examples/notion so fake-install copies the >>> sample files there. Then use @sample in the PLIST to have pkg_add >>> copy the files at install time. This is so that the user can modify the >>> files if needed without causing conflicts. >> >> I took another attempt to actually get your proposal to work. And after >> an hour of fighting with PREFIX and DESTDIR it finally started working. >> >> It looks like this now: >> >> MAKE_FLAGS= ETCDIR=$(SYSCONFDIR)/notion >> FAKE_FLAGS= ETCDIR=$(DESTDIR)$(PREFIX)/share/examples/notion > > That looks pretty standard; please s/DESTDIR/WRKINST/ for the variable > which is normally used in ports
Thanks, done. >> PLIST has @sample /etc/notion/* entries. > This isn't doing what you want, @sample refers to the previous installed > file, i.e. > > share/notion/welcome.txt > @sample file1 Ahhh right. I figured it out before checking mails today. I assumed the source files must exist in the fake installation, that's why I added the post-install step. This is not necessary then. It works as expected now. I snug in another little change, which is removing the escape characters from welcome.txt. On the first start, notion displays it with xmessage, which doesn't like escape characters. I finally feel good about this port and learned quite a bit about the port system. Port attached, again. Best Regards, Stefan
notion.tar.gz
Description: application/tar-gz