Differences

This shows you the differences between two versions of the page.

doc:devel:packages [2013/01/20 05:33]
whuang formating (add <code>)
doc:devel:packages [2013/02/05 12:29] (current)
conxuro
Line 60: Line 60:
As you can see, there's not much work to be done; everything is hidden in other makefiles and abstracted to the point where you only need to specify a few variables. As you can see, there's not much work to be done; everything is hidden in other makefiles and abstracted to the point where you only need to specify a few variables.
-  * PKG_NAME        -The name of the package, as seen via menuconfig and ipkg +  * PKG_NAME        - The name of the package, as seen via menuconfig and ipkg 
-  * PKG_VERSION    -The upstream version number that we're downloading +  * PKG_VERSION    - The upstream version number that we're downloading 
-  * PKG_RELEASE    -The version of this package Makefile +  * PKG_RELEASE    - The version of this package Makefile 
-  * PKG_BUILD_DIR  -Where to compile the package +  * PKG_BUILD_DIR  - Where to compile the package 
-  * PKG_SOURCE      -The filename of the original sources +  * PKG_SOURCE      - The filename of the original sources 
-  * PKG_SOURCE_URL  -Where to download the sources from +  * PKG_SOURCE_URL  - Where to download the sources from 
-  * PKG_MD5SUM      -A checksum to validate the download +  * PKG_MD5SUM      - A checksum to validate the download 
-  * PKG_CAT        -How to decompress the sources (zcat, bzcat, unzip) +  * PKG_CAT        - How to decompress the sources (zcat, bzcat, unzip) 
-  * PKG_BUILD_DEPENDS -Packages that need to be built before this package, but are not required at runtime. Uses the same syntax as DEPENDS below.+  * PKG_BUILD_DEPENDS - Packages that need to be built before this package, but are not required at runtime. Uses the same syntax as DEPENDS below. 
 +  * PKG_INSTALL    - Setting it to "1" will call the package's original "make install" with prefix set to PKG_INSTALL_DIR 
 +  * PKG_INSTALL_DIR - Where "make install" copies the compiled files
-The PKG_* variables define where to download the package from; @SF is a special keyword for downloading packages from sourceforge. The md5sum is used to verify the package was downloaded correctly and PKG_BUILD_DIR defines where to find the package after the sources are uncompressed into $(BUILD_DIR).+The PKG_* variables define where to download the package from; @SF is a special keyword for downloading packages from sourceforge. The md5sum is used to verify the package was downloaded correctly and PKG_BUILD_DIR defines where to find the package after the sources are uncompressed into $(BUILD_DIR). PKG_INSTALL_DIR defines where the files will be copied after calling "make install" (set with the PKG_INSTALL variable), and after that you can package them in the install section.
At the bottom of the file is where the real magic happens, "BuildPackage" is a macro setup by the earlier include statements. BuildPackage only takes one argument directly -- the name of the package to be built, in this case "bridge". All other information is taken from the define blocks. This is a way of providing a level of verbosity, it's inherently clear what the DESCRIPTION variable in Package/bridge is, which wouldn't be the case if we passed this information directly as the Nth argument to BuildPackage. At the bottom of the file is where the real magic happens, "BuildPackage" is a macro setup by the earlier include statements. BuildPackage only takes one argument directly -- the name of the package to be built, in this case "bridge". All other information is taken from the define blocks. This is a way of providing a level of verbosity, it's inherently clear what the DESCRIPTION variable in Package/bridge is, which wouldn't be the case if we passed this information directly as the Nth argument to BuildPackage.

Back to top

doc/devel/packages.txt · Last modified: 2013/02/05 12:29 by conxuro