Änderungen von help/howtos/development/developer_information/package_development_start/example_3 zwischen Version 1 und Version 2


Ignorieren:
Zeitstempel:
28.11.2013 22:50:16 (vor 5 Jahren)
Autor:
RomMon
Kommentar:

Legende:

Unverändert
Hinzugefügt
Entfernt
Geändert
  • help/howtos/development/developer_information/package_development_start/example_3

    v1 v2  
    2424ls -la /home/freetz/freetz-trunk/toolchain/target/lib/libxml2* 
    2525}}} 
     26 
     27The first ls should show the sub-directory `libxml`, and the second ls a number of lines with one being `libxml2.so.2.9.1' (or later), a a few symlinks pointing to this file. 
    2628 
    2729Now lets manual compile this application. 
     
    5355 
    5456vi ParCoordinator.cpp    
    55         add the following line somewhere between the existing include lines: 
     57        add the following line somewhere between the existing include lines, e.g. somewhere above line 38 (but not between an if/endif): 
    5658        #include <ctype.h> 
    5759make 
     
    6567     ^*^ Optional, to see the impact of stripping. The file command should also show the executable is a MIPS executable. 
    6668Next you might want to see that "`make clean`" properly works for this package. 
    67 This will remove all generated files. [[BR]](For packages involving a .config file you might want to save that file to a save location, because make clean often will also delete this file. But this is not applicable for httptunnel.) 
     69This will remove all generated files. [[BR]](For packages involving a .config file you might want to save that file to a save location, because make clean often will also delete this file. But this is not applicable for nzbget.) 
    6870{{{ 
    6971cd ~/freetz-trunk/nzbget/nzbget-11.0/ 
     
    7678== Add package to Freetz == 
    7779 
    78 In this example we will create the directory and file struckture ourself. 
    79  
    80 For each new package a directory under ~/freetz-trunk/make should be created with a minimum of two files: 
     80In this example we will create the directory and file structure ourself. 
     81 
     82For each new package a directory under ~/freetz-trunk/make/ should be created with a minimum of two files: 
    8183 
    8284{{{ 
     
    8890Optional there are more directories and files in case e.g. patches are needed. 
    8991 
    90 Lets create the directory structure and the two files for NZBget: 
     92Lets create the directory structure and the two files for NZBget:[[BR]] 
     93{{{ 
    9194cd /home/freetz/freetz-trunk/ 
    9295mkdir -p ~/freetz-trunk/make/nzbget/patches/ 
    9396vi ~/freetz-trunk/make/nzbget/Config.in 
     97}}} 
     98 
    9499{{{ 
    95100config FREETZ_PACKAGE_NZBGET 
     
    100105                NZBGet is a cross-platform binary newsgrabber for nzb files, written in C++.  
    101106                It supports client/server mode, automatic par-check/-repair and web-interface.  
    102                      NZBGet requires low system resources and runs great on routers, NAS-devices and media players. 
     107                NZBGet requires low system resources and runs great on routers, NAS-devices and media players. 
    103108}}} 
    104109The indents should be replaced with tabs. 
    105110 
    106 vi ~/freetz-trunk/make/nzbget/nzbget.mk 
     111`vi ~/freetz-trunk/make/nzbget/nzbget.mk` 
    107112{{{ 
    108113$(call PKG_INIT_BIN, 11.0) 
     
    149154The indents should be replaced with tabs. 
    150155 
     156We also need to add a small patch file to add the one missing include. 
     157 
     158`vi make/nzbget/patches/100-ParCoordinator_ctype.h.patch` 
     159{{{ 
     160diff -dur ParCoordinator.cpp.orig ParCoordinator.cpp 
     161--- ParCoordinator.cpp.orig 2013-11-18 23:46:41.720138807 +0100 
     162+++ ParCoordinator.cpp      2013-11-18 23:47:18.700129701 +0100 
     163@@ -35,6 +35,7 @@ 
     164 #include <string.h> 
     165 #include <stdio.h> 
     166 #include <stdarg.h> 
     167+#include <ctype.h> 
     168 #ifdef WIN32 
     169 #include <direct.h> 
     170 #else 
     171}}} 
     172 
    151173 
    152174== Create new image with added package == 
    153175 
    154176Like normal with creating an image execute `make menuconfig` and select your router model and all options and packages to be included.[[BR]] 
    155 The newly added package is located in: `Packages > Unstable`. 
     177The newly added package is located in: `Packages ---> Unstable ---> [*] nzbget 11.0`. 
     178 
     179If you manually created this package you might need a `rm /home/freetz/freetz-trunk/source/target-mipsel_gcc-4.6.4_uClibc-0.9.32.1/config.cache` or `make distclean`. And also be aware that the exports are still there, this can be easily solved with a reboot. 
     180 
     181After exiting, create the package with `make`. 
    156182 
    157183== Testing ==