summaryrefslogtreecommitdiff
path: root/Makefile
blob: 2307508773bedef286486f7594725ed5055fbb18 (plain)
  1. maintopics = desktop
  2. desktoptopics = email media mobile office scheduling web
  3. lcdesktoptopics = email office web
  4. lcgroups = all eu
  5. desktoptopiclists = $(patsubst %,profiles/desktop-%,$(desktoptopics))
  6. desktoptopiclcgrouplists = $(foreach topic,$(lcdesktoptopics),\
  7. profiles/desktop-$(topic)-%)
  8. desktoptweaks = tweaks/base tweaks/desktop
  9. basefiles = $(patsubst %,content/%/base/preseed.cfg,$(maintopics))
  10. topicfiles = $(patsubst %,content/desktop/%/preseed.cfg,$(desktoptopics))
  11. lcgroupfiles = $(foreach lcgroup,$(lcgroups),\
  12. $(patsubst %,content/desktop/%-$(lcgroup)/preseed.cfg,$(lcdesktoptopics)))
  13. mainfiles = $(patsubst %,content/%/preseed.cfg,$(maintopics))
  14. mainlcgroupfiles = $(patsubst %,content/desktop/%/preseed.cfg,$(lcgroups))
  15. profiles-di = $(basefiles) $(topicfiles) $(lcgroupfiles) $(mainfiles) $(mainlcgroupfiles)
  16. profiles-script = $(patsubst %/preseed.cfg,%/script.sh,$(profiles-di))
  17. profiles = $(profiles-di) $(profiles-script)
  18. mdfiles = content/MD5SUMS
  19. shafiles = $(patsubst %,content/SHA%SUMS,1 256 512)
  20. checksumfiles = $(mdfiles) $(shafiles)
  21. signfiles = $(patsubst %,%.sig,$(checksumfiles))
  22. info = content/NEWS content/TODO
  23. all: $(checksumfiles) $(info)
  24. sign: $(signfiles)
  25. $(basefiles): content/%/base/preseed.cfg : skel/preseed.cfg.in profiles/% profiles/%-z $(desktoptweaks)
  26. bin/pkglist2preseed $(filter skel/%,$^) $@ "$(filter profiles/%,$^)" "$(filter tweaks/%,$^)"
  27. $(topicfiles): content/desktop/%/preseed.cfg : skel/preseed.cfg.in profiles/desktop profiles/desktop-% profiles/desktop-z $(desktoptweaks)
  28. bin/pkglist2preseed $(filter skel/%,$^) $@ "$(filter profiles/%,$^)" "$(filter tweaks/%,$^)"
  29. $(lcgroupfiles): content/desktop/%/preseed.cfg : skel/preseed.cfg.in profiles/desktop profiles/desktop-% profiles/desktop-z $(desktoptweaks)
  30. bin/pkglist2preseed $(filter skel/%,$^) $@ "$(filter profiles/%,$^)" "$(filter tweaks/%,$^)"
  31. $(mainfiles): content/%/preseed.cfg : skel/preseed.cfg.in profiles/% $(desktoptopiclists) profiles/%-z $(desktoptweaks)
  32. bin/pkglist2preseed $(filter skel/%,$^) $@ "$(filter profiles/%,$^)" "$(filter tweaks/%,$^)"
  33. $(mainlcgroupfiles): content/desktop/%/preseed.cfg : skel/preseed.cfg.in profiles/desktop $(desktoptopiclists) $(desktoptopiclcgrouplists) profiles/desktop-z $(desktoptweaks)
  34. bin/pkglist2preseed $(filter skel/%,$^) $@ "$(filter profiles/%,$^)" "$(filter tweaks/%,$^)"
  35. $(profiles-script): %script.sh : %preseed.cfg
  36. $(mdfiles): content/MD%SUMS: $(profiles)
  37. cd content && md$*sum $(profiles:content/%=%) > MD$*SUMS~
  38. rm -f $@.sig
  39. mv -f $@~ $@
  40. $(shafiles): content/SHA%SUMS: $(profiles)
  41. cd content && sha$*sum $(profiles:content/%=%) > SHA$*SUMS~
  42. rm -f $@.sig
  43. mv -f $@~ $@
  44. $(signfiles): %.sig: %
  45. rm -f $@
  46. gpg --detach-sign -a -o $@ $<
  47. $(info): content/% : %
  48. mkdir -p content
  49. cp -f $< $@
  50. clean:
  51. rm -f $(profiles) $(info) $(checksumfiles) $(signfiles)