diff --git a/helpers/DATA/tasksel/Makefile b/helpers/DATA/tasksel/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..89a928bd97a5fac6e6df4dc96a6863cf4635edf3 --- /dev/null +++ b/helpers/DATA/tasksel/Makefile @@ -0,0 +1,91 @@ +DOMAIN=debian-tasks +TASKDESC=$(DOMAIN).desc +TASKDIR=/usr/share/tasksel +DESCDIR=tasks +UDOMAIN=trisquel-tasks +USUITE=$CODENAME +UFLAVOURS=trisquel-desktop triskel trisquel-mini trisquel-sugar trisquel-edu trisquel-pro trisquel-console +UTASKDESC=$(UDOMAIN).desc +UDESCDIR=trisquel-tasks +DESCPO=$(DESCDIR)/po +VERSION=$(shell expr "`dpkg-parsechangelog 2>/dev/null |grep Version:`" : '.*Version: \(.*\)' | cut -d - -f 1) +LANGS=ar bg bn bs ca cs cy da de dz el eo es et eu fa fi fr gl gu he hi hr hu hy id it ja km ko lt lv mg mk nb ne nl nn pa pl pt_BR pt ro ru sk sl sq sv ta te th tl tr uk vi wo zh_CN zh_TW +LANGS_DESC=ar bg bn bs ca cs cy da de dz el eo es et et eu fi fr gl gu he hi hr hu id it ja km ko lt lv mg mk nb ne nl nn pa pl pt_BR pt ro ru sk sl sq sv te th tl tr uk vi wo zh_CN zh_TW +LOCALEDIR=$(DESTDIR)/usr/share/locale + +all: $(UTASKDESC) po/build_stamp + +$(TASKDESC): makedesc.pl $(DESCDIR)/[a-z]??* + ./doincludes.pl $(DESCDIR) + ./makedesc.pl $(DESCDIR) $(TASKDESC) + +$(UDESCDIR): trisquel-seeds.pl +USUITE=$CODENAME + +$(UTASKDESC): makedesc.pl $(UDESCDIR)/[a-z]??* + ./makedesc.pl $(UDESCDIR) $(UTASKDESC) + +%.o: %.c + $(COMPILE) $< + +po/build_stamp: + $(MAKE) -C po LANGS="$(LANGS)" + +updatepo: + $(MAKE) -C po update LANGS="$(LANGS)" + +$(DESCPO)/build_stamp: + $(MAKE) -C $(DESCPO) LANGS="$(LANGS_DESC)" + +updatetaskspo: + $(MAKE) -C $(DESCPO) update LANGS="$(LANGS_DESC)" + +install: + install -d $(DESTDIR)/usr/bin \ + $(DESTDIR)/usr/lib/tasksel/tests \ + $(DESTDIR)/usr/lib/tasksel/packages \ + $(DESTDIR)/usr/share/man/man8 + install -m 755 tasksel.pl $(DESTDIR)/usr/bin/tasksel + install -m 755 tasksel-debconf $(DESTDIR)/usr/lib/tasksel/ + install -m 644 default_desktop $(DESTDIR)/usr/lib/tasksel/ + install -m 755 filter-tasks $(DESTDIR)/usr/lib/tasksel/ + install -m 755 tests/new-install $(DESTDIR)/usr/lib/tasksel/tests/ + install -m 755 tests/debconf $(DESTDIR)/usr/lib/tasksel/tests/ + install -m 755 tests/lang $(DESTDIR)/usr/lib/tasksel/tests/ + install -m 755 packages/list $(DESTDIR)/usr/lib/tasksel/packages/ + pod2man --section=8 --center "Debian specific manpage" --release $(VERSION) tasksel.pod | gzip -9c > $(DESTDIR)/usr/share/man/man8/tasksel.8.gz + for lang in $(LANGS); do \ + [ ! -d $(LOCALEDIR)/$$lang/LC_MESSAGES/ ] && mkdir -p $(LOCALEDIR)/$$lang/LC_MESSAGES/; \ + install -m 644 po/$$lang.mo $(LOCALEDIR)/$$lang/LC_MESSAGES/tasksel.mo; \ + done + +install-data: + install -d $(DESTDIR)$(TASKDIR)/descs \ + $(DESTDIR)/usr/lib/tasksel/info \ + $(DESTDIR)/usr/lib/tasksel/tests + install -m 0644 $(UTASKDESC) $(DESTDIR)$(TASKDIR)/descs + for test in tests/*; do \ + [ "$$test" = "tests/new-install" ] && continue; \ + [ "$$test" = "tests/debconf" ] && continue; \ + [ "$$test" = "tests/lang" ] && continue; \ + install -m 755 $$test $(DESTDIR)/usr/lib/tasksel/tests/; \ + done + for flavour in $(filter-out platform,$(UFLAVOURS)); do \ + ln -s desktop.preinst $(DESTDIR)/usr/lib/tasksel/info/$$flavour-desktop.preinst; \ + done + for package in packages/*; do \ + [ "$$package" = "packages/list" ] && continue; \ + install -m 755 $$package $(DESTDIR)/usr/lib/tasksel/packages/; \ + done +#Dropped +# for lang in $(LANGS_DESC); do \ +# [ ! -d $(LOCALEDIR)/$$lang/LC_MESSAGES/ ] && mkdir -p $(LOCALEDIR)/$$lang/LC_MESSAGES/; \ +# install -m 644 $(DESCDIR)/po/$$lang.mo $(LOCALEDIR)/$$lang/LC_MESSAGES/$(DOMAIN).mo; \ +# done + +clean: + rm -f $(TASKDESC) $(UTASKDESC) *~ + rm -rf debian/external-overrides + $(MAKE) -C po clean + $(MAKE) -C $(DESCPO) clean + diff --git a/helpers/DATA/tasksel/filter-tasks b/helpers/DATA/tasksel/filter-tasks new file mode 100755 index 0000000000000000000000000000000000000000..d4af863ad108e45ee89d7c5d22af8164bf02d637 --- /dev/null +++ b/helpers/DATA/tasksel/filter-tasks @@ -0,0 +1,72 @@ +#! /bin/sh +# +# Filter a list of tasks based on whether they are listed in +# tasksel/force-tasks, tasksel/limit-tasks, or tasksel/skip-tasks. We take a +# list of all displayable tasks as arguments. In the output file (first +# argument), we emit a series of lines each of one of these two forms, with +# the same meaning as in Test-new-install: +# +# task-name install +# task-name skip +# +# Tasks that should be shown as normal are omitted. +# +# (Yes, this could be done as part of the new-install test. However, until +# such time as tasksel's core uses debconf, this is very slow because it +# requires starting up debconf once per task.) + +set -e + +. /usr/share/debconf/confmodule + +OUTPUT="$1" +shift + +FORCE= +if db_fget tasksel/force-tasks seen && [ "$RET" = true ]; then + db_get tasksel/force-tasks + FORCE="$(echo "$RET" | sed 's/,/ /g')" +fi + +LIMIT= +if db_fget tasksel/limit-tasks seen && [ "$RET" = true ]; then + db_get tasksel/limit-tasks + LIMIT="$(echo "$RET" | sed 's/,/ /g')" +fi + +SKIP= +if db_fget tasksel/skip-tasks seen && [ "$RET" = true ]; then + db_get tasksel/skip-tasks + SKIP="$(echo "$RET" | sed 's/,/ /g')" +fi + +for task; do + for force in $FORCE; do + if [ "$task" = "$force" ]; then + echo "$task install" >> "$OUTPUT" + continue 2 + fi + done + + for skip in $SKIP; do + if [ "$task" = "$skip" ]; then + echo "$task skip" >> "$OUTPUT" + continue 2 + fi + done + + if [ "$LIMIT" ]; then + found=0 + for limit in $LIMIT; do + if [ "$task" = "$limit" ]; then + found=1 + break + fi + done + if [ "$found" = 0 ]; then + echo "$task skip" >> "$OUTPUT" + fi + fi +done + +exit 0 diff --git a/helpers/DATA/tasksel/dns-server b/helpers/DATA/tasksel/trisquel-tasks/dns-server similarity index 100% rename from helpers/DATA/tasksel/dns-server rename to helpers/DATA/tasksel/trisquel-tasks/dns-server diff --git a/helpers/DATA/tasksel/ltsp-server b/helpers/DATA/tasksel/trisquel-tasks/ltsp-server similarity index 100% rename from helpers/DATA/tasksel/ltsp-server rename to helpers/DATA/tasksel/trisquel-tasks/ltsp-server diff --git a/helpers/DATA/tasksel/mail-server b/helpers/DATA/tasksel/trisquel-tasks/mail-server similarity index 100% rename from helpers/DATA/tasksel/mail-server rename to helpers/DATA/tasksel/trisquel-tasks/mail-server diff --git a/helpers/DATA/tasksel/openssh-server b/helpers/DATA/tasksel/trisquel-tasks/openssh-server similarity index 100% rename from helpers/DATA/tasksel/openssh-server rename to helpers/DATA/tasksel/trisquel-tasks/openssh-server diff --git a/helpers/DATA/tasksel/print-server b/helpers/DATA/tasksel/trisquel-tasks/print-server similarity index 100% rename from helpers/DATA/tasksel/print-server rename to helpers/DATA/tasksel/trisquel-tasks/print-server diff --git a/helpers/DATA/tasksel/samba-server b/helpers/DATA/tasksel/trisquel-tasks/samba-server similarity index 100% rename from helpers/DATA/tasksel/samba-server rename to helpers/DATA/tasksel/trisquel-tasks/samba-server diff --git a/helpers/DATA/tasksel/triskel b/helpers/DATA/tasksel/trisquel-tasks/triskel similarity index 100% rename from helpers/DATA/tasksel/triskel rename to helpers/DATA/tasksel/trisquel-tasks/triskel diff --git a/helpers/DATA/tasksel/trisquel-console b/helpers/DATA/tasksel/trisquel-tasks/trisquel-console similarity index 100% rename from helpers/DATA/tasksel/trisquel-console rename to helpers/DATA/tasksel/trisquel-tasks/trisquel-console diff --git a/helpers/DATA/tasksel/trisquel-desktop b/helpers/DATA/tasksel/trisquel-tasks/trisquel-desktop similarity index 100% rename from helpers/DATA/tasksel/trisquel-desktop rename to helpers/DATA/tasksel/trisquel-tasks/trisquel-desktop diff --git a/helpers/DATA/tasksel/trisquel-mini b/helpers/DATA/tasksel/trisquel-tasks/trisquel-mini similarity index 100% rename from helpers/DATA/tasksel/trisquel-mini rename to helpers/DATA/tasksel/trisquel-tasks/trisquel-mini diff --git a/helpers/DATA/tasksel/web-server b/helpers/DATA/tasksel/trisquel-tasks/web-server similarity index 100% rename from helpers/DATA/tasksel/web-server rename to helpers/DATA/tasksel/trisquel-tasks/web-server diff --git a/helpers/make-tasksel b/helpers/make-tasksel index 9700b91939a5c3edf6a68bc77301ef94a4650fa5..48476e579f76588f8359d2393520787fa97e02dd 100644 --- a/helpers/make-tasksel +++ b/helpers/make-tasksel @@ -17,7 +17,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -VERSION=3 +VERSION=4 COMPONENT=main . ./config @@ -25,14 +25,14 @@ COMPONENT=main # No install recommends sed 's/Install-Recommends=true/Install-Recommends=false/g' -i tasksel.pl -mkdir trisquel-tasks -cp $DATA/* trisquel-tasks -sed s/lubuntu/trisquel-sugar/g Makefile -i -sed s/xubuntu/trisquel-mini/g Makefile -i -sed s/kubuntu/triskel/g Makefile -i -sed s/ubuntu/trisquel/g Makefile -i +#Remove debian generic-tasks +sed -i '/Package: task-desktop/,/$p/d' debian/control + +#Setup trisquel task required customization. +cp -r $DATA/trisquel-tasks . +cp $DATA/Makefile . +cp $DATA/filter-tasks . sed "/USUITE/s/.*/USUITE=$CODENAME/" Makefile -i -sed 's/\(UFLAVOURS=\).*/\1trisquel-desktop triskel trisquel-mini trisquel-sugar trisquel-edu trisquel-pro trisquel-console/' Makefile -i changelog "Added Trisquel's tasks"