Ignore:
Timestamp:
Dec 15, 2017, 6:58:54 PM (8 years ago)
Author:
Silvan Scherrer
Message:

spec: bww-resources-rpm: Release version 1.1.2-1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/bww-resources-rpm/macros.bww

    r1271 r1275  
    11#
    2 # Macros for bitwiseworks default WPS object structure
     2# Macros for bitwise works default WPS object structure
    33#
    4 # Reserved WPS ID's in this macro
     4# Reserved ObjectIDs in this macro
    55#  - README
    66#  - LICENSE
     
    1212#
    1313#
    14 # bww_folder creates:
    15 #  the bww help center as WP_BWWHELP wps id in WP_ASSISTANCE
    16 #  a shadow of the /@unixroot/usr/share/doc dir as WP_BWWDOC in the bww help center (WP_BWWHELP)
    17 #  the bww apps folder as WP_BWWAPPS in WP_PROGRAMSFOLDER
    18 #  a shadow of the bww help center as WP_BWWHELPSHADOW in the bww apps folder (WP_BWWAPPS)
    19 #  a folder for the installed app
     14# bww_folder creates the following objects:
     15# 1. The "bitwise works help center" object with an ObjectID of WP_BWWHELP
     16#    located in WP_ASSISTANCE
     17# 2. The "Package Documentation" object with an ObjectID of WP_BWWDOC as a
     18#    shadow of the /@unixroot/usr/share/doc directory within the "bitwise works
     19#    help center" (WP_BWWHELP)
     20# 3. The "bitwise works apps and ports" folder with an ObjectID of WP_BWWAPPS
     21#    within the "programs" (WP_PROGRAMSFOLDER)
     22# 4. A shadow of the "bitwise works help center" with an ObjectID of
     23#    WP_BWWHELPSHADOW in the "bitwise works apps and ports" folder (WP_BWWAPPS)
     24# 5. A folder for the installed app within the "bitwise works apps and ports"
     25#    (WP_BWWAPPS) folder
    2026#
    21 # the first 4 WPS objects are usually only updated and the referenc counter in wps_create is adjusted
    22 # it is necessary that every app creates the bww_folder first, as else the counters are wrong
     27# The WPS objects 1.-4. are normally updated only and the reference counter in
     28# wps_create is adjusted. Each app has to ensure the WPS objects 1.-4. exist
     29# and therefore creates/updates them first, otherwise the counters would be
     30# wrong.
    2331#
    24 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    25 # !!!!!! be aware that the -V option (if used) is not the last option. !!!!!!
    26 # !!!!!! as else the complete object is not generated.                 !!!!!!
    27 # !!!!!! this looks like a rpm issue                                   !!!!!!
    28 # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     32# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     33# !!!!!! Make sure the -V option (if used) is not the last option, !!!!!!
     34# !!!!!! otherwise the object is not generated.                    !!!!!!
     35# !!!!!! This looks like a rpm issue                               !!!!!!
     36# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2937#
    30 # %bww_folder -t TITLE [-V] [-n PAGKAGE]
    31 #  -t TITLE (Mandatory: use TITLE as the folder title)
    32 #     (TITLE *must* be a %global macro if with spaces)
    33 #  -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
    34 #  -V (when provided: don't add the version to the folder title)
     38# %bww_folder -t TITLE [-V] [-n PACKAGE]
     39#  -t TITLE (Mandatory: Use TITLE as the folder title)
     40#     (TITLE *must* be a %global macro if it contains spaces)
     41#  -V (Optional: Do not add the version to the folder title)
     42#  -n PACKAGE (Optional: Associate the folder with PACKAGE,
     43#     otherwise with %{name})
    3544
    3645%bww_folder(t:n:V)\
     
    4655%{nil}
    4756
    48 # bww_app creates:
    49 #  a object in the bww folder (will get a BWW_%{name}_<ID>_APP WPS object ID)
     57# bww_app:
     58# Creates an object in the "bitwise works apps and ports" folder, it will get
     59# an ObjectID of BWW_%{name}_<ID>_APP
    5060#
    5161# %bww_app [ID] -f APP -t TITLE [-n PACKAGE] [-s] [-a ASSOCIATIONS] [-i ICON] [-d STARTUPDIR]
    52 #  ID (when provided: this ID is added to the WPS id)
    53 #  -f EXEFILE (Mandatory: fullpath/to/app)
    54 #  -t TITLE (Mandatory: use TITLE as the app title)
     62#  ID (Optional: This ID is added to the ObjectID)
     63#  -f EXEFILE (Mandatory: Full path/to/app)
     64#  -t TITLE (Mandatory: Use TITLE as the app title)
    5565#     (TITLE *must* be a %global macro if with spaces)
    56 #  -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
    57 #  -a ASSOCIATIONS (when provided: associate a file filter to the object)
    58 #     examples are *.txt or *.txt,*.pdf,*.html
    59 #  -i ICON (when provided: an icon is added to the object)
    60 #     The icon has to be copied to /@unixroot/usr/share/os2/icons during
     66#  -n PACKAGE (Optional: Associate the folder with PACKAGE,
     67#     otherwise with %{name})
     68#  -a ASSOCIATIONS (Optional: Associate a file filter to the object, for
     69#     examples *.txt or *.txt,*.pdf,*.html)
     70#  -i ICON (Optional: An icon is added to the object)
     71#     The icon file has to be copied to /@unixroot/usr/share/os2/icons during
    6172#     installation!
    62 #  -d STARTUPDIR (when provided: this value is set as STARTUPDIR in the wps object)
     73#  -d STARTUPDIR (Optional: This value is set as STARTUPDIR in the wps object)
    6374#
    6475
     
    7687%{nil}
    7788
    78 # bww_app_shadow creates:
    79 #  a shadow of the object on the given WPS destination (will get a BWW_%{name}_<ID>_APP_SHADOW WPS object ID)
     89# bww_app_shadow:
     90# A shadow of the object will be created in the given WPS destination
     91# (will get a BWW_%{name}_<ID>_APP_<ObjectId>_SHADOW WPS object ID)
    8092#
    8193#
    82 # %bww_app_shadow [ID] -t TITLE [-n PACKAGE] [-d WPSID]
    83 #  ID (when provided: this ID is added to the WPS id)
    84 #  -t TITLE (Mandatory: use TITLE as the app title)
    85 #     (TITLE *must* be a %global macro if with spaces)
    86 #  -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
    87 #  -d WPSID (when provided: use this ID as the parent, else use WP_DESKTOP)
     94# %bww_app_shadow [ID] [-n PACKAGE] [-d ObjectID]
     95#  ID (Optional: This ID is added to the ObjectID)
     96#  -n PACKAGE (Optional: Associate the folder with PACKAGE,
     97#     otherwise with %{name})
     98#  -d ObjectID (Optional: Create the shadow within this ObjectID,
     99#     otherwise use WP_DESKTOP)
     100#
     101#  NOTE: Provide the ObjectID without <> brackets, as we add them in here
    88102#
    89103
    90 %bww_app_shadow(t:n:d:)\
    91 %{!-t:%{error:%0: Missing mandatory TITLE parameter}}\
     104%bww_app_shadow(n:d:)\
    92105%bww_create_folder_id\
    93106%bww_create_app_id\
    94 %global __bww_app_title %{-t*}\
    95107%global __bww_app_shadowdest %{!-d:WP_DESKTOP}%{-d:%{-d*}}\
    96 %wps_object_create %{__bww_app_id}_%{__bww_app_shadowdest}_SHADOW:WPShadow|%{__bww_app_title}|<%{__bww_app_shadowdest}>|SHADOWID=<%{__bww_app_id}>;\
     108%wps_object_create %{__bww_app_id}_%{__bww_app_shadowdest}_SHADOW:WPShadow|NotUsed|<%{__bww_app_shadowdest}>|SHADOWID=<%{__bww_app_id}>;\
    97109%{nil}
    98110
    99 # bww_readme creates:
    100 #  a shadow of a readme file (will get a BWW_%{name}_README WPS ID)
     111# bww_readme:
     112# Creates a shadow of a readme file (will get a BWW_%{name}_README ObjectID)
    101113#
    102114# %bww_readme -f FILE [-n PACKAGE]
    103 #  -f FILE (Mandatory: create a shadow for the provided readme FILE)
    104 #  -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
     115#  -f FILE (Mandatory: Create a shadow for the provided readme FILE)
     116#  -n PACKAGE (Optional: Associate the folder with PACKAGE,
     117#     otherwise with %{name})
    105118
    106119%bww_readme(f:n:)\
     
    108121%{nil}
    109122
    110 # bww_license creates:
    111 #  a shadow of a license file (will get a BWW_%{name}_LICENSE WPS ID)
     123# bww_license:
     124# Creates a shadow of a license file (will get a BWW_%{name}_LICENSE ObjectID)
    112125#
    113126# %bww_license -f LICENSE [-n PACKAGE]
    114 #  -f FILE (Mandatory: create a shadow for the provided license FILE)
    115 #  -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
     127#  -f FILE (Mandatory: Create a shadow for the provided license FILE)
     128#  -n PACKAGE (Optional: Associate the folder with PACKAGE,
     129#     otherwise with %{name})
    116130
    117131%bww_license(f:n:)\
     
    119133%{nil}
    120134
    121 # bww_copyright creates:
    122 #  a shadow of a copyright file (will get a BWW_%{name}_COPYRIGHT WPS ID)
     135# bww_copyright:
     136# Creates a shadow of a copyright file (will get a BWW_%{name}_COPYRIGHT ObjectID)
    123137#
    124138# %bww_copyright -f FILE [-n PACKAGE]
    125 #  -f FILE (Mandatory: create a shadow for the provided copyright FILE)
    126 #  -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
     139#  -f FILE (Mandatory: Create a shadow for the provided copyright FILE)
     140#  -n PACKAGE (Optional: Associate the folder with PACKAGE,
     141#     otherwise with %{name})
    127142
    128143%bww_copyright(f:n:)\
     
    130145%{nil}
    131146
    132 # bww_changelog creates:
    133 #  a shadow of a changelog file (will get a BWW_%{name}_CHANGELOG WPS ID)
     147# bww_changelog:
     148# Creates a shadow of a changelog file (will get a BWW_%{name}_CHANGELOG ObjectID)
    134149#
    135150# %bww_changelog -f FILE [-n PACKAGE]
    136 #  -f FILE (Mandatory: create a shadow for the provided changelog FILE)
    137 #  -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
     151#  -f FILE (Mandatory: Create a shadow for the provided changelog FILE)
     152#  -n PACKAGE (Optional: Associate the folder with PACKAGE,
     153#     otherwise with %{name})
    138154
    139155%bww_changelog(f:n:)\
     
    141157%{nil}
    142158
    143 # bww_docdir creates:
    144 #  a shadow of a doc directory (will get a BWW_%{name}_DOCDIR WPS ID)
     159# bww_docdir:
     160# Creates a shadow of a doc directory (will get a BWW_%{name}_DOCDIR ObjectID)
    145161#
    146162# %bww_docdir -f FILE [-n PACKAGE]
    147 #  -f FILE (Mandatory: create a shadow for the provided doc FILE (directory in this case))
    148 #  -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
     163#  -f FILE (Mandatory: Create a shadow for the provided doc FILE (directory in this case))
     164#  -n PACKAGE (Optional: Associate the folder with PACKAGE,
     165#     otherwise with %{name})
    149166
    150167%bww_docdir(f:n:)\
     
    152169%{nil}
    153170
    154 # bww_file creates:
    155 #  a shadow of a file (will get a BWW_%{name}_<ID> WPS object ID)
     171# bww_file:
     172# Creates a shadow of a file (will get a BWW_%{name}_<ID> ObjectID)
    156173#
    157174# %bww_file ID -f FILE [-n PACKAGE]
    158175#  ID (Mandatory: the name of the file for the WPS object id)
    159 #  -f FILE (Mandatory: create a shadow for the provided FILE)
    160 #  -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name})
     176#  -f FILE (Mandatory: Create a shadow for the provided FILE)
     177#  -n PACKAGE (Optional: Associate the folder with PACKAGE,
     178#     otherwise with %{name})
    161179
    162180%bww_file(f:n:)\
    163 %{!?1:%{error:%0: Missing mandatory WPS ID parameter}}\
     181%{!?1:%{error:%0: Missing mandatory ObjectID parameter}}\
    164182%{!-f:%{error:%0: Missing mandatory FILE parameter}}\
    165183%bww_create_folder_id\
     
    168186%wps_object_create BWW_%{__bww_folder_name}_%{__bww_file_id}:WPShadow|%{__bww_file_id}|<%{__bww_folder_id}>|SHADOWID=((%{__bww_file}))\
    169187%{nil}
    170 
    171188
    172189%bww_create_folder_id(n:)\
     
    179196%global __bww_app_id BWW_%{__bww_folder_name}%{__bww_pkg_id}_APP\
    180197%{nil}
    181 
Note: See TracChangeset for help on using the changeset viewer.