/[polypkg]/trunk/pp.back
ViewVC logotype

Contents of /trunk/pp.back

Parent Directory Parent Directory | Revision Log Revision Log


Revision 189 - (show annotations)
Wed Oct 15 22:57:46 2008 UTC (13 months ago) by dleonard
File size: 2653 byte(s)
remove archaic vararg form: ${1+"$@"} -> "$@"  
1 #
2 # Backend API
3 #
4 # Each backend for a platform <P> should provide these functions
5 #
6 # pp_backend_P_init - Initialises variables that the %set may replace
7 # pp_backend_P - Reads the output files from the frontend and generate
8 # the single output package file in $pp_wrkdir
9 # pp_backend_P_names - Prints the output package names, without the
10 # $pp_wrkdir prefix. The names should start with
11 # "$name-$version"
12 # pp_backend_P_probe - Prints the short platform identifier
13 # pp_backend_P_cleanup - Removes leftover temporary files, and may be
14 # called without pp_backend_P_init/pp_backend_P
15 # being invoked.
16 # pp_backend_P_detect - Returns true if running on the given platform.
17 # First arguement is output of 'uname -s'
18 # pp_backend_P_init_svc_vars - Initialise per-service variables
19 # pp_backend_P_install_script - Generates a script file that installs/
20 # upgrades the recently package built
21 # pp_backend_P_function - Generates shell code for platform functions
22 #
23 # A backend should also add itself to the $pp_platforms variable
24 #
25 # Variable assumptions the platform functions may make are
26 #
27 # $name
28 # $version
29 # $summary
30 # $description
31 # $copyright
32 #
33 # Backends for platform P can use private variables of the form $pp_P_*
34 # and document user-provided variables of the form $P_* where P is the
35 # platform name (eg aix or linux)
36 #
37 # Helper functions are:
38 #
39 # pp_mkgroup group -- no effect if group exists
40 # pp_mkuser [-d home] [-g group] user -- no effect if user exists
41 # pp_havelib name [major[.minor] [directory...]]
42 #
43
44 #@ pp_backend_init(): call the current platform backend's initialiser
45 #@ pp_backend(): call the current platform backend's processor
46 #@ pp_backend_names(): print the current platform backend's package names
47 #@ pp_backend_cleanup(): call the current platform backend's cleanup
48 #@ pp_backend_init_svc_vars(): call the current platform backend's svc var init
49 #@ pp_backend_install_script(): call the current backend's install script gen
50 #@ pp_backend_function(): emit a helper function
51 #@ pp_backend_probe(): print the current platform's short identifier
52 #@ pp_backend_vas_platforms(): print the current VAS platform's identifier(s)
53 #-- these functions are so similar, we generate them
54 for _sufx in _init '' _names _cleanup _install_script \
55 _init_svc_vars _function _probe _vas_platforms
56 do
57 eval "pp_backend$_sufx () { pp_debug pp_backend$_sufx; pp_backend_\${pp_platform}$_sufx \"\$@\"; }"
58 done

Ted.Percival@quest.com
ViewVC Help
Powered by ViewVC 1.1.2