summaryrefslogtreecommitdiff
path: root/Makefile
blob: 6deeeed625bc4d7902df8f54e16f1d3fd7d180e4 (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 %,%.sign,$(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 $@.sign
  39. mv -f $@~ $@
  40. $(shafiles): content/SHA%SUMS: $(profiles)
  41. cd content && sha$*sum $(profiles:content/%=%) > SHA$*SUMS~
  42. rm -f $@.sign
  43. mv -f $@~ $@
  44. $(signfiles): %.sign: %
  45. rm -f $@
  46. gpg --detach-sign -a -o $@ $<
  47. $(info): content/% : %
  48. cp -f $< $@
  49. clean:
  50. rm -f $(profiles) $(info) $(checksumfiles) $(signfiles)