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.
 
 
 

54 lines
1.5 KiB

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