# HG changeset patch # User Volker Grabsch # Date 1286019868 -7200 # Node ID 8e21c194b7d31b1bf92138f4db4379806f9a7969 # Parent 37aa3912b50121f6d301170dec74183a1225b911 revised the "guidelines for creating packages" in the docs diff -r 37aa3912b501 -r 8e21c194b7d3 doc/index.html --- a/doc/index.html Sat Oct 02 13:14:16 2010 +0200 +++ b/doc/index.html Sat Oct 02 13:44:28 2010 +0200 @@ -40,6 +40,10 @@ border-collapse: separate; border-spacing: 1px; } + table.translation td { + padding-left: 0.5em; + padding-right: 0.5em; + } td, dt { background-color: #eee; } @@ -106,22 +110,23 @@

MinGW cross compiling environment

@@ -469,213 +474,9 @@

In addition, feel free to join the - project mailing list. + project mailing list + and to propose new packages.

- -

Guidelines for Creating Packages

- -
    -
  1. -

    - The package should be a - free - software - library - that is really used by one of your applications. -

    - -

    - BTW, we're always curious about the applications people are porting. - We maintain is a - list of projects - which use mingw-cross-env. - No matter whether your project is free or proprietary - – as long as it has it's own website, - we'd be happy to link to it. -

    - -

    - Also, feel free to link to us. :-) -

    -
  2. - -
  3. -

    - Grep through the src/*.mk files - to find a project that is most similar to yours. - (Really, grep is your friend here.) -

    - -

    - For instance, - when adding a GNU library, - you should take a package like - gettext.mk - or - libiconv.mk - as the base of your work. - When using a SourceForge project, - you could start with a copy of - xmlwrapp.mk. - And so on. -

    -
  4. - -
  5. -

    - Adjust the comments, - fill in the $(PKG)_* fields. -

    - -

    - Be especially careful with the $(PKG)_DEPS section. - The easiest way to get the dependencies right - is to start with a minimal setup. - That is, - initialize mingw-corss-env with make gcc only. -

    - -

    - Always list the dependency on gcc explicitly: -

    -
    $(PKG)_DEPS     := gcc ...
    -
  6. - -
  7. -

    - Write your $(PKG)_BUILD. - If your library has a ./configure script, - enable/disable all depdency libraries explicitly - via "--enable-*" and "--disable-*" options. -

    -
  8. - -
  9. -

    - You might also have to provide a patch for it. - In that case, have a look at other patches such as - sdl-2-fix-dinput.patch. - In particular, each patch file should be named as: -

    -
    PACKAGE-PATCHNUMBER-DESCRIPTION.patch
    -

    - and should start with: -

    -
    This file is part of mingw-cross-env.
    -See doc/index.html for further information.
    -
    -This patch has been taken from:
    -https://...
    -

    - where the URL points to the - bugtracker entry, - mailing list entry or - website - you took the patch from. -

    - -

    - If you created the patch yourself, - please offer it to the upstream project first, - and point to that URL, - using the same wording: - "This patch has been taken from:". -

    - -

    - Depending on the feedback you get from the upstream project, - you might want to improve your patch. -

    -
  10. - -
  11. -

    - If you find some time, - please provide a minimal test program for it. - It should be - simple, - stand alone and - should work unmodified for many (all?) future versions of the library. - Test programs are named as: -

    -
    PACKAGE-test.c
    - or -
    PACKAGE-test.cpp
    -

    - depending on whether it is a C or C++ library. - To get a clue, - please have a look at existing test programs such as - sdl-test.c. -

    - -

    - At the very end of your *.mk file - you should build the test program in a generic way, - using strict compiler flags. - The last few lines of - sdl.mk - will give you a clue. -

    -
  12. - -
  13. -

    - You could also try to provide a $(PKG)_UPDATE section. - However, that requires some experience and "feeling" for it. - So it is perfectly okay if you leave the $(PKG)_UPDATE section empty. - We'll fill that in for you. - It's a funny exercise. -

    -
  14. - -
  15. -

    - Check that you don't have "dirty stuf" in your *.mk files, - such as TAB characters or trailing spaces at lines endings. - Have a look at random *.mk files - to get a feeling for the coding style. -

    - -

    - The same holds for your test program. -

    - -

    - However, patch files should always appear - in the same coding style as the files they are patching. -

    - -

    - Finally, in your $(PKG)_BUILD section, - please check that you use our portability variables: -

    - - - - - - - -
    bash $(SHELL)
    install $(INSTALL)
    libtoolize$(LIBTOOLIZE)
    make $(MAKE)
    patch $(PATCH)
    sed $(SED)
    -
  16. - -
  17. -

    - Check whether everything runs fine. If you have some trouble, - don't hesitate to ask on the - mailing list, - providing your *.mk file so far. -

    -
  18. - -
  19. -

    - Propose your final *.mk file to the mailing list. Don't forget - to tell us if there are some pieces in your *.mk file you feel - unsure about. We'll then have a specific look at those parts, - which avoids trouble for you and us in the future. -

    -
  20. @@ -697,7 +498,7 @@
  21. openSUSE
  22. - +
    @@ -1024,6 +825,217 @@
    +

    Guidelines for Creating Packages

    + +
      +
    1. +

      + The package should be a + free + software + library + that is really used by one of your applications. +

      + +

      + BTW, we're always curious about the applications people are porting. + We maintain is a + list of projects + which use mingw-cross-env. + No matter whether your project is free or proprietary + – as long as it has its own website, + we'd be happy to link to it. +

      + +

      + Also, feel free to link to us. :-) +

      +
    2. + +
    3. +

      + Grep through the src/*.mk files + to find a project that is most similar to yours. + (Really, grep is your friend here.) +

      + +

      + For instance, + when adding a GNU library, + you should take a package like + gettext.mk + or + libiconv.mk + as the base of your work. + When using a SourceForge project, + you could start with a copy of + xmlwrapp.mk. + And so on. +

      +
    4. + +
    5. +

      + Adjust the comments, + fill in the $(PKG)_* fields. +

      + +

      + Be especially careful with the $(PKG)_DEPS section. + The easiest way to get the dependencies right + is to start with a minimal setup. + That is, + initialize mingw-corss-env with make gcc only. +

      + +

      + Always list the dependency on gcc explicitly: +

      +
      $(PKG)_DEPS     := gcc ...
      +
    6. + +
    7. +

      + Write your $(PKG)_BUILD. + If your library has a ./configure script, + enable/disable all depdency libraries explicitly + via "--enable-*" and "--disable-*" options. +

      +
    8. + +
    9. +

      + You might also have to provide a patch for it. + In that case, have a look at other patches such as + sdl-2-fix-dinput.patch. + In particular, each patch file should be named as: +

      +
      PACKAGE-PATCHNUMBER-DESCRIPTION.patch
      +

      + and should start with: +

      +
      This file is part of mingw-cross-env.
      +See doc/index.html for further information.
      +
      +This patch has been taken from:
      +https://...
      +

      + where the URL points to the + bugtracker entry, + mailing list entry or + website + you took the patch from. +

      + +

      + If you created the patch yourself, + please offer it to the upstream project first, + and point to that URL, + using the same wording: + "This patch has been taken from:". +

      + +

      + Depending on the feedback you get from the upstream project, + you might want to improve your patch. +

      +
    10. + +
    11. +

      + If you find some time, + please provide a minimal test program for it. + It should be + simple, + stand alone and + should work unmodified for many (all?) future versions of the library. + Test programs are named as: +

      +
      PACKAGE-test.c
      + or +
      PACKAGE-test.cpp
      +

      + depending on whether it is a C or C++ library. + To get a clue, + please have a look at existing test programs such as + sdl-test.c. +

      + +

      + At the very end of your *.mk file + you should build the test program in a generic way, + using strict compiler flags. + The last few lines of + sdl.mk + will give you a clue. +

      +
    12. + +
    13. +

      + You could also try to provide a $(PKG)_UPDATE section. + However, that requires some experience and "feeling" for it. + So it is perfectly okay if you leave the $(PKG)_UPDATE section empty. + We'll fill that in for you. + It's a funny exercise. +

      +
    14. + +
    15. +

      + Check that you don't have "dirty stuf" in your *.mk files, + such as TAB characters or trailing spaces at lines endings. + Have a look at random *.mk files + to get a feeling for the coding style. +

      + +

      + The same holds for your test program. +

      + +

      + However, patch files should always appear + in the same coding style as the files they are patching. +

      + +

      + Finally, in your $(PKG)_BUILD section, + please check that you use our portability variables: +

      +
    Autoconf ≥ 2.62
    + + + + + + +
    bash $(SHELL)
    install $(INSTALL)
    libtoolize$(LIBTOOLIZE)
    make $(MAKE)
    patch $(PATCH)
    sed $(SED)
    + + +
  23. +

    + Check whether everything runs fine. + If you have some trouble, + don't hesitate to ask on the + mailing list, + providing your *.mk file so far. +

    +
  24. + +
  25. +

    + Propose your final *.mk file to the mailing list. + Don't forget to tell us + if there are some pieces in your *.mk file + you feel unsure about. + We'll then have a specific look at those parts, + which avoids trouble for you and us in the future. +

    +
  26. +
+ + +