You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

52 lines
1.5 KiB

  1. PROGRAM=tasksel
  2. TASKDESC=debian-tasks.desc
  3. DESCDIR=tasks/
  4. CC=gcc
  5. CFLAGS=-g -Wall #-Os
  6. DEBUG=1
  7. ifeq (0,$(DEBUG))
  8. DEFS=-DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PROGRAM)\" -DLOCALEDIR=\"/usr/share/locale\" \
  9. -DTASKDESC=\"/usr/share/tasksel/$(TASKDESC)\"
  10. else
  11. DEFS=-DVERSION=\"$(VERSION)\" -DPACKAGE=\"$(PROGRAM)\" -DLOCALEDIR=\"/usr/share/locale\" \
  12. -DTASKDESC=\"$(TASKDESC)\" -DDEBUG
  13. endif
  14. VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)' | cut -d - -f 1)
  15. LIBS=-lslang #-lccmalloc -ldl
  16. OBJS=tasksel.o slangui.o data.o util.o strutl.o
  17. LANGS=cs da de es hu ja nb_NO pl pt_BR ru sv zh_TW
  18. LOCALEDIR=$(DESTDIR)/usr/share/locale
  19. COMPILE = $(CC) $(CFLAGS) $(DEFS) -c
  20. LINK = $(CC) $(CFLAGS) $(DEFS) -o
  21. all: $(PROGRAM) $(TASKDESC)
  22. $(TASKDESC): makedesc.pl $(DESCDIR)/*
  23. perl makedesc.pl $(DESCDIR) $(TASKDESC)
  24. %.o: %.c
  25. $(COMPILE) $<
  26. po/build_stamp:
  27. $(MAKE) -C po LANGS="$(LANGS)"
  28. $(PROGRAM): $(OBJS) po/build_stamp
  29. $(LINK) $(PROGRAM) $(OBJS) $(LIBS)
  30. install:
  31. install -m 755 tasksel $(DESTDIR)/usr/bin
  32. install -m 0644 $(TASKDESC) $(DESTDIR)/usr/share/tasksel
  33. pod2man --center "Debian specific manpage" --release $(VERSION) tasksel.pod | gzip -9c > $(DESTDIR)/usr/share/man/man8/tasksel.8.gz
  34. for lang in $(LANGS); do \
  35. [ ! -d $(LOCALEDIR)/$$lang/LC_MESSAGES/ ] && mkdir -p $(LOCALEDIR)/$$lang/LC_MESSAGES/; \
  36. install -m 644 po/$$lang.mo $(LOCALEDIR)/$$lang/LC_MESSAGES/$(PROGRAM).mo; \
  37. done
  38. test:
  39. $(MAKE) -C scratch
  40. clean:
  41. rm -f $(PROGRAM) $(TASKDESC) *.o *~
  42. $(MAKE) -C po clean