corecode / dma

The DragonFly Mail Agent, a small Mail Transport Agent (MTA), designed for home and office use.
Other
235 stars 51 forks source link

cmake #92

Closed colazivi closed 4 years ago

colazivi commented 4 years ago

Hello,

one of the more inconvenient issues I've encountered with dma, is that it just doesn't build out-of-the-box correct binaries on some OS. For example on FreeBSD it builds, but the default username "mail" just doesn't exist there. That makes it impossible for root to send any e-mails. On some other architectures it just refuses to build.

One solution to this is switching from the Makefiles to a cmake project. It's just much easier to add custom rules for specific architectures there. That's why I've created a little cmake project for dma in my repo

It also:

In order to support the libbsd, I've had to change the logic of embedding dfcompat.[ch] and add a copy of the roundup()-macro there.

I've tested it on various Linux, FreeBSD, Dragonfly BSD systems. It also compiles on SunOS, it just needs a custom username to be provided as an environment-variable.

If you like it, I can happily create a PR to merge it.

corecode commented 4 years ago

I think going to cmake as a build requirement is too much for dma; we can add code to the Makefile to test for the groups and complain if they don't exist.

colazivi commented 4 years ago

Ok