archive

πŸ₯˜ Ingredients

🍳 Cookware

  • if
  • endif
  • if
  • endif
  • include
  • if
  • else
  • endif
  1. 1
    /* * cook - file construction tool * Copyright (C) 2002, 2006-2008, 2010 Peter Miller * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see * <http://www.gnu.org/licenses/>. */
  2. 2
    /* * Integration builds also make the files for distribution. */ if [not [defined baseline]] then { all += integration-build-targets;
  3. 3
    /* * Adjust the mtime of recipe targets to be exactly 1 second * younger than the youngest ingredient. This helps aeipass * compress the mtimes. */ set time-adjust-back; }
  4. 4
    if 0 if [in [fromto %1.D%2 %2 [version]] 001 002 003] then if [find_command rpmbuild] then all += RPM; endif
  5. 5
    integration-build-targets = ;
  6. 6
    integration-build-targets: [integration-build-targets];
  7. 7
    integration-build-targets += archive/[project_minus].tar.gz [fromto etc/%.html archive/%.html [match_mask etc/%.html [source_files]] ] archive/[project_short].png archive/[project_short].64.png archive/[project_minus].ug.pdf archive/[project_minus].rm.pdf archive/[project_minus].tut.pdf /* archive/[project_minus].faq */ archive/[project_minus].spec archive/[project_minus].README archive/[project_minus].ae
  8. 8
    /* * This next file is for the benefit of the Translation Project's * email robot. (Yes, that's right, a bloody robot.) * * See http://www.iro.umontreal.ca/contrib/po/HTML/maintainers.html * for more information. * * I particularly dislike this approach, because it is incredibly * short sighted. This approach fails to take into account that * you may want to have translations of manual pages and other * documentation, AS WELL AS translations of error messages. * * Would it make sense to ask authors to catenate all of * ther man pages together, and have a po/PACKAGE.man file? * No, of course not. Would it make sense to ask authors to * catenate all of their other documentation together, and * have a po/PACKAGE.latex file? No, of course not. Well then, * why on Earth does it make sense to catenate together all of * the messages into a po/PACKAGE.pot file? Betch. * * And then, to add insult to injury, it wastes space in the tarball. * * My project uses a directory tree * lib/ * <LL>/ * LC_MESSAGES/ * all of the various .po files go here * man<N>/ * all of the man<N> pages go here * user-guide/ * all of the files which make the * user guide go here. * <other-docs>/ * and so on... * * As you can see, this can accomodate translated .po files, * AND ALSO any other documentation, once it is translated. */ po/[project_short].pot ;
  9. 9
    if [find_command png2ico]
  10. 10
    integration-build-targets += archive/[project_short].ico ;
  11. 11
    endif
  12. 12
    /* * These recipes build a Makefile for a user. They do not build a * Makefile useful for a development build, because no arch * information is included in the Makefile. */
  13. 13
    Makefile.in: [source_files] { aemakegen -p [project] -c [change] | [awk] -f [resolve etc/Makefile.awk] > [target]; }
  14. 14
    CHANGES = etc/CHANGES.[version_short];
  15. 15
    source_file_order = README [sort [stringset [CHANGES] [source_files] install-sh BUILDING LICENSE Makefile.in etc/version.so common/config.h.in common/patchlevel.h configure [project_short].spec [project_short].png - README ] ]
  16. 16
    /* * This next file is for the benefit of the Translation Project's * email robot. (Yes, that's right, a bloody robot.) * * See http://www.iro.umontreal.ca/contrib/po/HTML/maintainers.html * for more information. * * I particularly dislike this approach, because it is incredibly * short sighted. This approach fails to take into account that * you may want to have translations of manual pages and other * documentation, AS WELL AS translations of error messages. * * Would it make sense to ask authors to catenate all of * ther man pages together, and have a po/PACKAGE.man file? * No, of course not. Would it make sense to ask authors to * catenate all of their other documentation together, and * have a po/PACKAGE.latex file? No, of course not. Well then, * why on Earth does it make sense to catenate together all of * the messages into a po/PACKAGE.pot file? Betch. * * And then, to add insult to injury, it wastes space in the tarball. * * My project uses a directory tree * lib/ * <LL>/ * LC_MESSAGES/ * all of the various .po files go here * man<N>/ * all of the man<N> pages go here * user-guide/ * all of the files which make the * user guide go here. * <other-docs>/ * and so on... * * As you can see, this can accomodate translated .po files, * AND ALSO any other documentation, once it is translated. */ po/[project_short].pot ;
  17. 17
    archive/[project_minus].tar.gz: [source_file_order] debian/control /* at al */ set shallow { tar cf - [resolve [source_file_order]] debian/changelog debian/compat debian/control debian/rules debian/cook.install | tardy -unu 0 -gnu 0 -una Peter -gna Miller -p [project_minus] -ms 0644 -mc 07022 -now [prepost "-rp=" "" [search_list]] > archive/[project_minus].tar; gzip -9 -v archive/[project_minus].tar; }
  18. 18
    archive/[project_minus].ae: [source_files] set shallow { if [find_command aedist] then { /* * must be *system* aedist, not just built aedist, * since it uses the existing project, which may * not even be readable by the newly built aedist */ aedist -p=[project] -c=[change] -o [target]; } else [print Skipping [target], since no aedist(1) found]; }
  19. 19
    [CHANGES]: etc/CHANGES.sh [vs_file] { sh [resolve etc/CHANGES.sh] [project] > [target]; }
  20. 20
    archive/[project_minus].ug.pdf: lib/en/user-guide/user-guide.pdf set shallow { cp [resolve [need]] [target]; }
  21. 21
    archive/[project_minus].rm.pdf: lib/en/refman/refman.pdf set shallow { cp [resolve [need]] [target]; }
  22. 22
    archive/[project_minus].tut.pdf: lib/en/tutorial/tutorial.pdf set shallow { cp [resolve [need]] [target]; }
  23. 23
    archive/[project_minus].faq: lib/en/faq/faq.txt set shallow { cp [resolve [need]] [target]; }
  24. 24
    README: lib/en/readme/readme.txt { cp [resolve [need]] [target]; }
  25. 25
    BUILDING: lib/en/building/building.txt { cp [resolve [need]] [target]; }
  26. 26
    archive/[project_minus].README: lib/en/readme/readme.txt set shallow { cp [resolve [need]] [target]; }
  27. 27
    etc/%.html.d: etc/%.html set nocascade { c_incl -nc -ns -eia -r -nrec [cc_include_flags] -prefix "'cascade etc/"%".html ='" -suffix "';'" [resolve etc/%.html] [prepost "-rlp=" "" [search_list]] /* remove leading path */ -slp [arch] "'[arch]'" /* substitute leading path */ -o [target]; } include -cooked-nowarn [addsuffix ".d" [match_mask etc/%.html [source_files]]]
  28. 28
    archive/%.html: etc/%.html: etc/ssp.awk etc/version.so set shallow { roffpp [cc_include_flags] [resolve etc/%.html] | groff -Tascii -t -P-hub -man | [awk] -f [resolve etc/ssp.awk] > [target]; }
  29. 29
    [project_short].spec: etc/spec.sh [source_files] { version=[version_short] sh [resolve etc/spec.sh] [source_files] > [target]; }
  30. 30
    archive/[project_minus].spec: [project_short].spec set shallow { cat [need] > [target]; }
  31. 31
    archive/%: etc/%.uue set shallow { uudecode [resolve [need]] -o [target]; }
  32. 32
    %: etc/%.uue set shallow { uudecode [resolve [need]] -o [target]; }
  33. 33
    /* * This is not in the integration build taregs because it takes far too * long to do. */
  34. 34
    RPM: archive/[project_minus]-1.i386.rpm;
  35. 35
    archive/[project_minus]-1.i386.rpm archive/[project_minus]-1.src.rpm: archive/[project_minus].tar.gz etc/rpm-build.sh archive/[project_short].png set shallow { sh [resolve etc/rpm-build.sh] RPM-temporary [resolve archive/[project_minus].tar.gz] ; mv RPM-temporary/RPMS/i386/[project_minus]-1.i386.rpm archive/[project_minus]-1.i386.rpm ; mv RPM-temporary/SRPMS/[project_minus]-1.src.rpm archive/[project_minus]-1.src.rpm ; rm -r RPM-temporary; }
  36. 36
    archive/%.ico archive/%-64.png archive/%-48.png archive/%-32.png archive/%-16.png: archive/%.png { convert [resolve archive/%.png] -scale 64 archive/%-64.png; convert [resolve archive/%.png] -scale 48 archive/%-48.png; convert [resolve archive/%.png] -scale 32 archive/%-32.png; convert [resolve archive/%.png] -scale 16 archive/%-16.png; png2ico [target] archive/%-64.png archive/%-48.png archive/%-32.png archive/%-16.png ; }
  37. 37
    check-tarball: archive/[project_minus].tar.gz { rm -rf [project_minus]; tar xzf [resolve archive/[project_minus].tar.gz]; cd [project_minus] && ./configure && make; rm -rf [project_minus]; }
  38. 38
    debian/control debian/changelog debian/cook.install: [source_files] set shallow { /* This actually makes more files than just debian/control */ aemakegen -p [project] -c [change]
  39. 39
    cat debian/cook.install; }
  40. 40
    if [in [fromto %1D%2 %2 [version]] 001 002 003 004] then { integration-build-targets += debian-package; }
  41. 41
    debian-package: archive/[project_minus].tar.gz debian/changelog { local vsn = [collect head -1 [resolve debian/changelog] | sed "'s|.*(\([^()]*\).*|\1|'" ]; vsn = [fromto %-1 % [vsn]]; function print "vsn = '"[vsn]"'"; if [not [in [count [vsn]] 1]] then fail "debian version not right"; local tarball = [project_short]_[vsn].orig.tar.gz;
  42. 42
    local user = [collect id -un]; local key = ; if [in [user] archives] then key = -k19CEC7D5; else key = -us -uc;
  43. 43
    /* * We fake the .orig.tar.gz file to not have a debian/ directory, * by filtering it out with tardy. This silences a PITA lintian * warning, for no real benefit. */
  44. 44
    unset GPG_AGENT_INFO && rm -rf archive/debian && mkdir -p archive/debian && cd archive/debian && echo Options Indexes > .htaccess && gunzip < ../[project_minus].tar.gz | tardy -exclude "'"[project_minus]"/debian/*'" | gzip -9 > [tarball] && tar xzf ../[project_minus].tar.gz && cd [project_minus] && if 0 dpkg-buildpackage -sgpg [key] -sa && else debuild [key] -sa && endif cd .. && rm -rf [project_minus] && lintian -iIv ; }
  45. 45
    archive/%1.%2.png: archive/%1.png set shallow { convert archive/%1.png -scale %2x%2 [target]; }

Actions

πŸ“₯ Download .cook File πŸ”— View Original