I've built a service and I'd like to distribute it via rpm and should work on different fedora releases. Since it is a service it should be integrated with the system so it is possible to do:
$ service myapp start
The problem is that fedora used upstart in releases 9 to 14 and systemd from 15 and up. I can do this for both systems, but I'm not sure how to package it correctly.
I think I have to build different rpms for the fedora releases. The only thing that differs is a few files to be copied to different locations.
How should I handle the differences? In the .spec-file or Makefile? Or should I use two different .spec-files?
Do it in the spec file. Use separate sources for the upstart and systemd scripts, and include the appropriate script based on the version of Fedora being built on. So, single spec file to handle both cases.