Changeset 1231 for spec/trunk/SPECS/bww-resources-rpm/macros.bww
- Timestamp:
- Sep 4, 2017, 3:04:32 PM (8 years ago)
- File:
-
- 1 edited
-
spec/trunk/SPECS/bww-resources-rpm/macros.bww (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/bww-resources-rpm/macros.bww
r1203 r1231 1 #1 a shadow of a file (will geta BWW_%{name}_<ID>_FILE WPS object ID)# 2 2 # Macros for bitwiseworks default WPS object structure 3 3 # 4 # bww_folder creates the 5 common WPS objects 5 # - Create bitwiseworks Help Center 6 # - Create shadow of the apps doc dir in the bitwise help Center 7 # - Create bitwiseworks Apps and Ports folder 8 # - Create shadow of the bitwise help Center in the Apps and ports folder (if provided) 9 # - Create folder for the installed app 4 # bww_folder creates: 5 # a folder for the installed app 10 6 # 11 # bww_app creates the WPS object for the installed app 12 # - Create program object for the installed app in the app folder 13 # - Associate file filter with the installed app (if provided) 14 # - Associate Icon to the app (if provided) 15 # - Create shadow of the installed app on the desktop (if provided) 7 # %bww_folder -t TITLE [-n PAGKAGE] [-V] 8 # -t TITLE (Mandatory: use TITLE as the folder title) 9 # (TITLE *must* be a %global macro if with spaces) 10 # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name}) 11 # -V (when provided: don't add the version to the folder title) 12 13 %bww_folder(t:n:V)\ 14 %{!?-t:%{error:%0: Missing mandatory TITLE parameter}}\ 15 %bww_create_folder_id\ 16 %global __bww_title %{-t*}\ 17 %global __bww_title_ver %{!-V:%{__bww_title} %{version}}%{-V:%{__bww_title}}\ 18 %wps_object_create %{__bww_folder_id}:WPFolder|%{__bww_folder_name}|<WP_BWWAPPS>|TITLE=%{__bww_title_ver};\ 19 %{nil} 20 21 # bww_app creates: 22 # a object in the bww folder (will get a BWW_%{name}_<ID>_APP WPS object ID) 23 # a shadow of the object on the desktop (if requested) (will get a BWW_%{name}_<ID>_APP_SHADOW WPS object ID) 16 24 # 17 # bww_readme creates the WPS object for the readme 18 # - Create shadow of a file 19 # 20 # parameter (-t) (used in bww_folder, bww_app) 21 # this is the desired title for the folder or the app, if this parameter is left 22 # out, we use %{summary} as the title 23 # 24 # parameter (-d) (used in bww_folder, bww_readme) 25 # use this name as the document directory part 26 # If this parameter is not provided, %_defaultdocdir/%{name}-%{version} is used 27 # 28 # parameter (-e) (used in bww_app) 29 # This is the name of the app w/o the extension 30 # This parameter is mandatory to create a WPS object 31 # 32 # parameter (-i) (used in bww_app) 33 # Icon for the app. If this parameter is left out, no icon is added 34 # The icon has to be copied to /@unixroot/usr/share/os2/icons during installation 35 # If this parameter is not provided, no icons are added 36 # 37 # parameter (-a) (used in bww_app) 38 # Associate a file filter (for example -a *.txt) to the app 39 # If this parameter is not provided, no associations are added 40 # 41 # parameter (-s) (used in bww_folder, bww_app) 42 # Create a shadow 43 # If this parameter is not provided, no shadow is generated 44 # 45 # parameter (-o) (used in bww_app) 46 # App extension including the . like .cmd .bat .sh 47 # If this parameter is not provided, then .exe is used 48 # 49 # parameter (-r) (used in bww_readme) 50 # Create a shadow for the provided readme 51 # If this parameter is not provided, then no shadow is created 52 # 53 # parameter (-v) (used in bww_folder) 54 # Don't add the version to the folder name 55 # If this parameter is not provided, then the version is added 25 # %bww_app [ID] -f APP -t TITLE [-n PACKAGE] [-a ASSOCIATIONS] [-i ICON] [-d STARTUPDIR] [-s] 26 # ID (when provided: this ID is added to the WPS id) 27 # -f EXEFILE (Mandatory: fullpath/to/app) 28 # -t TITLE (Mandatory: use TITLE as the app title) 29 # (TITLE *must* be a %global macro if with spaces) 30 # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name}) 31 # -a ASSOCIATIONS (when provided: associate a file filter to the object) 32 # examples are *.txt or *.txt,*.pdf,*.html 33 # -i ICON (when provided: a icon is added to the object) 34 # The icon has to be copied to /@unixroot/usr/share/os2/icons during 35 # installation! 36 # -d STARTUPDIR (when provided: this value is set as STATUPDIR in the wps object) 37 # -s (when provided: create a shadow on the desktop) 56 38 # 57 39 58 %bww_ folder(t:d:s:v:)\59 % if %{undefined __bww_folder_done}\60 % define __bww_titleov %{!-t:%{summary}}%{-t:%{-t*}}\61 % define __bww_title %{!-v:%{__bww_titleov} %{version}}%{-v:%{__bww_titleov}}\62 % define __bww_docdir %{!-d:%_defaultdocdir/%{name}-%{version}}%{-d:%{-d*}}\63 % wps_object_create WP_BWWHELP:WPFolder|bww Help|<WP_ASSISTANCE>|TITLE=bitwiseworks Help Center;SHOWALLINTREEVIEW=YES;ICONRESOURCE=60,PMWP.DLL;ICONNRESOURCE=83,PMWP.DLL;BACKGROUND=((/@unixroot/usr/share/os2/bww/bwwfbkg.bmp));\64 % wps_object_create %{name}_BWWHELP:WPShadow|Readme|<WP_BWWHELP>|SHADOWID=((%{__bww_docdir}));\65 % wps_object_create WP_BWWAPPS:WPFolder|bww Apps|<WP_PROGRAMSFOLDER>|TITLE=bitwiseworks Apps and Ports;ICONRESOURCE=1,BWWRES.DLL;ICONNFILE=((/@unixroot/usr/share/os2/bww/bwwfldro.ico));BACKGROUND=((/@unixroot/usr/share/os2/bww/bwwfbkg.bmp));ICONVIEW=FLOWED;\66 % {-s:%{expand:%wps_object_create WP_BWWHELPSHADOW:WPShadow|bitwiseworks Help Center|<WP_BWWAPPS>|SHADOWID=<WP_BWWHELP>;}}\67 % wps_object_create %{name}_FOLDER:WPFolder|%{name}|<WP_BWWAPPS>|TITLE=%{__bww_title};\68 % global __bww_folder_done 1\69 % endif\40 %bww_app(f:t:n:a:i:d:s)\ 41 %{!-f:%{error:%0: Missing mandatory EXEFILE parameter}}\ 42 %{!-t:%{error:%0: Missing mandatory TITLE parameter}}\ 43 %bww_create_folder_id\ 44 %bww_create_app_id\ 45 %global __bww_app_title %{-t*}\ 46 %global __bww_app_icon %{!-i:}%{-i:ICONFILE=((/@unixroot/usr/share/os2/icons/%{-i*}));}\ 47 %global __bww_app_assoc %{!-a:}%{-a:ASSOCFILTER=%{-a*};}\ 48 %global __bww_app_startupdir %{!-d:}%{-d:STARTUPDIR=((%{-d*}));}\ 49 %global __bww_app_name %{-f*}\ 50 %wps_object_create %{__bww_app_id}:WPProgram|%{__bww_app_title}|<%{__bww_folder_id}>|EXENAME=((%{__bww_app_name}));%{__bww_app_startupdir}TITLE=%{__bww_app_title};%{__bww_app_icon}%{__bww_app_assoc}\ 51 %{-s:%wps_object_create %{__bww_app_id}_SHADOW:WPShadow|%{__bww_app_title}|<WP_DESKTOP>|SHADOWID=<%{__bww_app_id}>;}\ 70 52 %{nil} 71 53 72 %bww_app(t:e:s:i:a:o:)\ 73 %define __bww_exeTitle %{!-t:%{summary}}%{-t:%{-t*}}\ 74 %define __bww_exeIcon %{!-i:}%{-i:ICONFILE=((/@unixroot/usr/share/os2/icons/%{-i*}));}\ 75 %define __bww_exeAssoc %{!-a:}%{-a:ASSOCFILTER=%{-a*};}\ 76 %define __bww_exeName %{!-o:%{-e*}.exe}%{-o:%{-e*}%{-o*}}\ 77 %{-e:%{expand:%wps_object_create %{-e*}_EXE:WPProgram|%{__bww_exeTitle}|<%{name}_FOLDER>|EXENAME=((%_bindir/%{__bww_exeName}));STARTUPDIR=((%_bindir));TITLE=%{__bww_exeTitle};%{__bww_exeIcon}%{__bww_exeAssoc}}}\ 78 %{-s:%{-e:%{expand:%wps_object_create %{-e*}_SHADOW:WPShadow|%{__bww_exeTitle}|<WP_DESKTOP>|SHADOWID=<%{-e*}_EXE>;}}}\ 54 # bww_readme creates: 55 # a shadow of a readme file (will get a BWW_%{name}_README_FILE WPS ID) 56 # 57 # %bww_readme -f FILE [-n PACKAGE] 58 # -f FILE (Mandatory: create a shadow for the provided readme FILE) 59 # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name}) 60 61 %bww_readme(f:n:)\ 62 %bww_file README\ 79 63 %{nil} 80 64 81 %bww_readme(r:d:)\ 82 %define __bww_docdir %{!-d:%_defaultdocdir/%{name}-%{version}}%{-d:%{-d*}}\ 83 %{-r:%{expand:%wps_object_create %{name}_README:WPShadow|Readme|<%{name}_FOLDER>|SHADOWID=((%{__bww_docdir}/%{-r*}))}}\ 65 # bww_license creates: 66 # a shadow of a license file (will get a BWW_%{name}_LICENSE_FILE WPS ID) 67 # 68 # %bww_license -f LICENSE [-n PACKAGE] 69 # -f FILE (Mandatory: create a shadow for the provided license FILE) 70 # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name}) 71 72 %bww_license(f:n:)\ 73 %bww_file LICENSE\ 84 74 %{nil} 75 76 # bww_copyright creates: 77 # a shadow of a copyright file (will get a BWW_%{name}_COPYRIGHT_FILE WPS ID) 78 # 79 # %bww_copyright -f FILE [-n PACKAGE] 80 # -f FILE (Mandatory: create a shadow for the provided copyright FILE) 81 # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name}) 82 83 %bww_copyright(f:n:)\ 84 %bww_file COPYRIGHT\ 85 %{nil} 86 87 # bww_file creates: 88 # a shadow of a file (will get a BWW_%{name}_<ID>_FILE WPS object ID) 89 # 90 # %bww_file ID -f FILE [-n PACKAGE] 91 # ID (Mandatory: the name of the file for the WPS object id) 92 # -f FILE (Mandatory: create a shadow for the provided FILE) 93 # -n PACKAGE (when provided: associate the folder with PACKAGE, else with %{name}) 94 95 %bww_file(f:n:)\ 96 %{!?1:%{error:%0: Missing mandatory WPS ID parameter}}\ 97 %{!-f:%{error:%0: Missing mandatory FILE parameter}}\ 98 %bww_create_folder_id\ 99 %global __bww_file_id %{1}\ 100 %global __bww_file %{-f*}\ 101 %wps_object_create BWW_%{__bww_folder_name}_%{__bww_file_id}_FILE:WPShadow|%{__bww_file_id}|<%{__bww_folder_id}>|SHADOWID=((%{__bww_file}))\ 102 %{nil} 103 104 105 %bww_create_folder_id(n:)\ 106 %global __bww_folder_name %{!-n:%{name}}%{-n:%{-n*}}\ 107 %global __bww_folder_id BWW_%{__bww_folder_name}_FOLDER\ 108 %{nil} 109 110 %bww_create_app_id(n:)\ 111 %global __bww_pkg_id %{?1:_%{1}}%{!?1:}\ 112 %global __bww_app_id BWW_%{__bww_folder_name}%{__bww_pkg_id}_APP\ 113 %{nil} 114
Note:
See TracChangeset
for help on using the changeset viewer.
