HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Change
  • Wiki History
  • Next Change →

Changes between Version 4 and Version 5 of HaikuPorterForPM/BuildRecipes


Ignore:
Timestamp:
06/12/13 05:04:33 (2 years ago)
Author:
zooey
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HaikuPorterForPM/BuildRecipes

    v4 v5  
    391391}}} 
    392392 
    393 == Example == 
    394  
    395 ...TODO... 
     393== Examples == 
     394 
     395=== A simple example === 
     396 
     397This is the build recipe for `gawk`, which is rather generic. It provides two commands (one of which is just a symlink to the other) and it just requires Haiku for execution. 
     398 
     399{{{ 
     400SUMMARY="A pattern scanning and processing language"  
     401DESCRIPTION=" 
     402        If you are like many computer users, you would frequently like to make  
     403        changes in various text files wherever certain patterns appear, or  
     404        extract data from parts of certain lines while discarding the rest. To  
     405        write a program to do this in a language such as C or Pascal is a  
     406        time-consuming inconvenience that may take many lines of code. The job  
     407        is easy with awk, especially the GNU implementation: gawk. 
     408 
     409        The awk utility interprets a special-purpose programming language that  
     410        makes it possible to handle simple data-reformatting jobs with just a  
     411        few lines of code. 
     412        " 
     413HOMEPAGE="http://www.gnu.org/software/coreutils"  
     414SRC_URI="http://ftp.gnu.org/gnu/gawk/gawk-3.1.8.tar.bz2" 
     415CHECKSUM_MD5="52b41c6c4418b3226dfb8f82076193bb" 
     416LICENSE="GNU GPL v3" 
     417COPYRIGHT="1983-2010 Free Software Foundation, Inc." 
     418REVISION="2" 
     419ARCHITECTURES="x86_gcc2 ?x86" 
     420 
     421PROVIDES=" 
     422        gawk = $portVersion compat >= 3 
     423        cmd:awk = $portVersion compat >= 3 
     424        cmd:gawk = $portVersion compat >= 3 
     425        " 
     426REQUIRES=" 
     427        haiku >= $haikuVersion 
     428        " 
     429BUILD_REQUIRES=" 
     430        " 
     431BUILD_PREREQUIRES=" 
     432        haiku_devel >= $haikuVersion 
     433        cmd:gcc 
     434        cmd:ld 
     435        cmd:libtoolize 
     436        cmd:make 
     437        cmd:sed 
     438        " 
     439 
     440SOURCE_DIR="$portVersionedName" 
     441 
     442BUILD() 
     443{ 
     444        libtoolize --force --copy --install 
     445        ./configure $configureDirArgs 
     446        make 
     447} 
     448 
     449INSTALL() 
     450{ 
     451        make install 
     452} 
     453 
     454TEST() 
     455{ 
     456        make check 
     457} 
     458}}} 
     459 
     460=== An advanced example === 
     461 
     462This is the build recipe for `git`, which depends on a number of other packages at both build- and runtime. Additionally, git provides a number of general sibling packages. 
     463 
     464{{{ 
     465SUMMARY="Fast, scalable, distributed revision control system" 
     466DESCRIPTION=" 
     467        Git is a free and open source distributed version control system designed  
     468        to handle everything from small to very large projects with speed and  
     469        efficiency. 
     470 
     471        Git is easy to learn and has a tiny footprint with lightning fast  
     472        performance. It outclasses SCM tools like Subversion, CVS, Perforce,  
     473        and ClearCase with features like cheap local branching, convenient  
     474        staging areas, and multiple workflows. 
     475        "  
     476HOMEPAGE="http://git-scm.com/"  
     477LICENSE="GNU GPL v2" 
     478COPYRIGHT="2005-2012 Git Authors (see git web site for list)" 
     479 
     480SRC_URI="http://git-core.googlecode.com/files/git-1.7.10.2.tar.gz" 
     481CHECKSUM_MD5="2e2ee53243ab8e7cf10f15c5229c3fce" 
     482SOURCE_DIR="$portVersionedName" 
     483PATCHES="git-1.7.10.2.patch" 
     484 
     485SRC_URI_2="http://git-core.googlecode.com/files/git-manpages-1.7.10.2.tar.gz" 
     486CHECKSUM_MD5_2="79bae5456db8366803d28db867892d74" 
     487 
     488SRC_URI_3="http://git-core.googlecode.com/files/git-htmldocs-1.7.10.2.tar.gz" 
     489CHECKSUM_MD5_3="9c401a36aee40d68f5ca3513818e8f29" 
     490 
     491REVISION="2" 
     492 
     493ARCHITECTURES="x86_gcc2 ?x86" 
     494 
     495PROVIDES=" 
     496        git = $portVersion compat >= 1.7 
     497        cmd:git = $portVersion compat >= 1.7 
     498        cmd:git_receive_pack = $portVersion compat >= 1.7 
     499        cmd:git_shell = $portVersion compat >= 1.7 
     500        cmd:git_upload_archive = $portVersion compat >= 1.7 
     501        cmd:git_upload_pack = $portVersion compat >= 1.7 
     502        " 
     503PROVIDES_arch=" 
     504        git_arch = $portVersion compat >= 1.7 
     505        cmd:git_archimport = $portVersion compat >= 1.7 
     506        " 
     507PROVIDES_cvs=" 
     508        git_cvs = $portVersion compat >= 1.7 
     509        cmd:git_cvsserver = $portVersion compat >= 1.7 
     510        " 
     511PROVIDES_daemon=" 
     512        git_daemon = $portVersion compat >= 1.7 
     513        cmd:git_daemon = $portVersion compat >= 1.7 
     514        " 
     515PROVIDES_email=" 
     516        git_email = $portVersion compat >= 1.7 
     517        cmd:git_send_email = $portVersion compat >= 1.7 
     518        " 
     519PROVIDES_source=" 
     520        git_source = $portVersion compat >= 1.7 
     521        " 
     522PROVIDES_svn=" 
     523        git_svn = $portVersion compat >= 1.7 
     524        cmd:git_svn = $portVersion compat >= 1.7 
     525        " 
     526 
     527REQUIRES=" 
     528        haiku >= $haikuVersion 
     529        curl 
     530        expat 
     531        man 
     532        openssl 
     533        perl 
     534        python 
     535        zlib 
     536        cmd:nano 
     537        " 
     538REQUIRES_arch=" 
     539        haiku >= $haikuVersion 
     540        git == $portVersion 
     541        " 
     542REQUIRES_cvs=" 
     543        haiku >= $haikuVersion 
     544        git == $portVersion 
     545        " 
     546REQUIRES_daemon=" 
     547        haiku >= $haikuVersion 
     548        git == $portVersion 
     549        " 
     550REQUIRES_email=" 
     551        haiku >= $haikuVersion 
     552        git == $portVersion 
     553        " 
     554REQUIRES_svn=" 
     555        haiku >= $haikuVersion 
     556        git == $portVersion 
     557        " 
     558         
     559BUILD_REQUIRES=" 
     560        $REQUIRES 
     561        cmd:gcc 
     562        cmd:ld 
     563        cmd:make 
     564        cmd:sed 
     565        cmd:tar 
     566        " 
     567BUILD_PREREQUIRES=" 
     568        haiku_devel >= $haikuVersion 
     569        " 
     570 
     571BUILD() 
     572{ 
     573        make 
     574} 
     575 
     576INSTALL() 
     577{ 
     578        make strip  
     579        make install 
     580         
     581        # replace copies of git binaries with symlinks 
     582        cd $prefix/bin 
     583        for program in git*; do  
     584                ln -sfn "../lib/git-core/$program" "$program" 
     585        done 
     586 
     587        # copy manpages 
     588        mkdir -p $manDir 
     589        cp -rd $sourceDir2/* $manDir/ 
     590 
     591        # copy html documentation 
     592        htmlDir=$docDir/html 
     593        mkdir -p $htmlDir 
     594        cp -rd $sourceDir3/*.html $htmlDir/ 
     595        rm $htmlDir/git-gui.html 
     596 
     597        # copy asciidoc documentation for which there isn't any corresponding html 
     598        asciidocDir=$docDir/asciidoc 
     599        mkdir -p $asciidocDir 
     600        for f in $sourceDir3/*.txt; do 
     601                html=$sourceDir3/$(basename $f .txt).html 
     602                if ! [ -e $html ]; then 
     603                        cp -d $f $asciidocDir/ 
     604                fi 
     605        done 
     606         
     607        packageEntries arch \ 
     608                documentation/packages/git/html/git-archimport.html \ 
     609                documentation/man/man1/git-archimport.1 \ 
     610                lib/git-core/git-archimport 
     611                 
     612        packageEntries cvs \ 
     613                bin/git-cvsserver \ 
     614                documentation/packages/git/html/git-cvsexportcommit.html \ 
     615                documentation/packages/git/html/git-cvsimport.html \ 
     616                documentation/packages/git/html/git-cvsserver.html \ 
     617                documentation/man/man1/git-cvsexportcommit.1 \ 
     618                documentation/man/man1/git-cvsimport.1 \ 
     619                documentation/man/man1/git-cvsserver.1 \ 
     620                documentation/man/man7/gitcvs-migration.7 \ 
     621                lib/git-core/git-cvsexportcommit \ 
     622                lib/git-core/git-cvsimport \ 
     623                lib/git-core/git-cvsserver 
     624         
     625        packageEntries daemon \ 
     626                documentation/packages/git/html/git-credential-cache--daemon.html \ 
     627                documentation/packages/git/html/git-credential-cache.html \ 
     628                documentation/packages/git/html/git-daemon.html \ 
     629                documentation/man/man1/git-credential-cache--daemon.1 \ 
     630                documentation/man/man1/git-credential-cache.1 \ 
     631                documentation/man/man1/git-daemon.1 \ 
     632                lib/git-core/git-credential-cache--daemon \ 
     633                lib/git-core/git-credential-cache \ 
     634                lib/git-core/git-daemon 
     635                 
     636        packageEntries email \ 
     637                documentation/packages/git/html/git-send-email.html \ 
     638                documentation/man/man1/git-send-email.1 \ 
     639                lib/git-core/git-send-email 
     640                 
     641        packageEntries svn \ 
     642                documentation/packages/git/html/git-svn.html \ 
     643                documentation/man/man1/git-svn.1 \ 
     644                lib/git-core/git-svn 
     645} 
     646}}} 

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/