1 | # ArcaMapper GUI for OS/2 systems.
|
---|
2 | #
|
---|
3 | %define _topdir x:/Home/rpm/arcamapper
|
---|
4 | %define _unpackaged_files_terminate_build 0
|
---|
5 | %define version 0.9.6
|
---|
6 | %define release 0
|
---|
7 | %define src_ver %{version}-%{release}
|
---|
8 | %define prefix %{_prefix}
|
---|
9 | %define repo_ver 263
|
---|
10 |
|
---|
11 | %define __requires_exclude ^ndcalls\\\.dll$
|
---|
12 |
|
---|
13 |
|
---|
14 | ###### Base package info ######
|
---|
15 |
|
---|
16 | Summary: ArcaMapper LAN client user interface
|
---|
17 | Name: arcamapper-ui
|
---|
18 | Version: %{version}
|
---|
19 | Release: %{release}
|
---|
20 | License: Various
|
---|
21 | Group: Networking/Other
|
---|
22 | #Source: %{name}-%{version}.zip
|
---|
23 | %scm_source svn https://svn.arcanoae.com/arcamapper/trunk %{repo_ver}
|
---|
24 | Requires: libc libgcc-fwd libgcc libcx libstdc++
|
---|
25 | Requires: heimdal heimdal-libs
|
---|
26 | BuildRequires: gcc
|
---|
27 | BuildRequires: libc-devel
|
---|
28 | BuildRoot: %{_topdir}/BUILDROOT/%{name}-%{version}-%{release}
|
---|
29 | BuildArch: i686
|
---|
30 |
|
---|
31 | %define help_dir %{_datadir}/os2/help
|
---|
32 | %define data_dir %{_datadir}/arcamapper
|
---|
33 | %define lang_dir %{_datadir}/os2/lang
|
---|
34 | %define doc_dir %{_defaultdocdir}/%{name}-%{version}
|
---|
35 |
|
---|
36 |
|
---|
37 | %description
|
---|
38 | ArcaMapper UI is a set of user interface tools for the ArcaOS LAN client
|
---|
39 | based on NetDrive and the NDPSMB plugin.
|
---|
40 |
|
---|
41 |
|
---|
42 | ###### Qt UI package info ######
|
---|
43 |
|
---|
44 | %package qt
|
---|
45 |
|
---|
46 | Requires: arcamapper-ui >= %{version}
|
---|
47 | Requires: libqt4-gui
|
---|
48 | BuildRequires: qt4-devel-kit
|
---|
49 | Summary: ArcaMapper LAN client user interface, Qt based
|
---|
50 | Group: Networking/Other
|
---|
51 |
|
---|
52 | %description qt
|
---|
53 | A Qt-based graphical user interface for ArcaMapper UI, the ArcaOS LAN
|
---|
54 | client based on NetDrive and the NDPSMB plugin.
|
---|
55 |
|
---|
56 |
|
---|
57 |
|
---|
58 | ###### Common setup ######
|
---|
59 |
|
---|
60 | %prep
|
---|
61 | %scm_setup
|
---|
62 |
|
---|
63 |
|
---|
64 | %build
|
---|
65 | make all
|
---|
66 |
|
---|
67 |
|
---|
68 | %install
|
---|
69 | rm -rf $RPM_BUILD_ROOT
|
---|
70 | echo Copying files to $RPM_BUILD_ROOT ...
|
---|
71 | mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
---|
72 | mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
---|
73 | mkdir -p $RPM_BUILD_ROOT%{doc_dir}
|
---|
74 | mkdir -p $RPM_BUILD_ROOT%{lang_dir}
|
---|
75 | mkdir -p $RPM_BUILD_ROOT%{help_dir}
|
---|
76 | mkdir -p $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
77 | mkdir -p $RPM_BUILD_ROOT%{data_dir}/gui
|
---|
78 | mkdir -p $RPM_BUILD_ROOT%{data_dir}/locale
|
---|
79 | cp install/*.ico $RPM_BUILD_ROOT%{data_dir}/gui
|
---|
80 | cp browse/browse.exe $RPM_BUILD_ROOT%{_bindir}
|
---|
81 | cp browse/browse.map $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
82 | cp browse/browse.sym $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
83 | cp browse/language/*.qm $RPM_BUILD_ROOT%{data_dir}/locale
|
---|
84 | cp browse/help/browse*.hlp $RPM_BUILD_ROOT%{help_dir}
|
---|
85 | cp connect/connect.exe $RPM_BUILD_ROOT%{_bindir}
|
---|
86 | cp connect/connect.map $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
87 | cp connect/connect.sym $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
88 | cp connect/language/*.qm $RPM_BUILD_ROOT%{data_dir}/locale
|
---|
89 | cp connect/help/connect*.hlp $RPM_BUILD_ROOT%{help_dir}
|
---|
90 | cp credman/credman.exe $RPM_BUILD_ROOT%{_bindir}
|
---|
91 | cp credman/credman.map $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
92 | cp credman/credman.sym $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
93 | cp credman/language/*.qm $RPM_BUILD_ROOT%{data_dir}/locale
|
---|
94 | cp credman/help/credman*.hlp $RPM_BUILD_ROOT%{help_dir}
|
---|
95 | cp ntlmcred/ntlmcrsv.exe $RPM_BUILD_ROOT%{_bindir}
|
---|
96 | cp ntlmcred/ntlmcrsv.map $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
97 | cp ntlmcred/ntlmcrsv.sym $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
98 | cp ntlmcred/LICENSE.ntlmcrsv $RPM_BUILD_ROOT%{doc_dir}/LICENSE.ntlmcrsv
|
---|
99 | cp pmcred/pmcred.exe $RPM_BUILD_ROOT%{_bindir}
|
---|
100 | cp pmcred/pmcred.map $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
101 | cp pmcred/pmcred.sym $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
102 | cp pmcred/credmmri.dll $RPM_BUILD_ROOT%{_libdir}
|
---|
103 | cp pmcred/credmmri.map $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
104 | cp net/net.cmd $RPM_BUILD_ROOT%{_bindir}
|
---|
105 | cp net/net_nd.exe $RPM_BUILD_ROOT%{_bindir}
|
---|
106 | cp net/net_s.exe $RPM_BUILD_ROOT%{_bindir}
|
---|
107 | cp net/net_*.msg $RPM_BUILD_ROOT%{lang_dir}
|
---|
108 | cp net/net_nd.map $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
109 | cp net/net_s.map $RPM_BUILD_ROOT%{data_dir}/debug
|
---|
110 | cp LICENSE.txt $RPM_BUILD_ROOT%{doc_dir}/LICENSE.txt
|
---|
111 | cp common/GPL.txt $RPM_BUILD_ROOT%{doc_dir}/GPL.txt
|
---|
112 | cp common/LGPL.txt $RPM_BUILD_ROOT%{doc_dir}/LGPL.txt
|
---|
113 |
|
---|
114 |
|
---|
115 | %files
|
---|
116 | %defattr(-,root,root,-)
|
---|
117 | %dir %{doc_dir}
|
---|
118 | %dir %{data_dir}
|
---|
119 | %dir %{lang_dir}
|
---|
120 | %dir %{data_dir}/debug
|
---|
121 | %{_bindir}/net.cmd
|
---|
122 | %{_bindir}/net_nd.exe
|
---|
123 | %{_bindir}/net_s.exe
|
---|
124 | %{_bindir}/ntlmcrsv.exe
|
---|
125 | %{_bindir}/pmcred.exe
|
---|
126 | %{_libdir}/credmmri.dll
|
---|
127 | %{data_dir}/debug/ntlmcrsv.*
|
---|
128 | %{data_dir}/debug/net_nd.*
|
---|
129 | %{data_dir}/debug/net_s.*
|
---|
130 | %{data_dir}/debug/pmcred.*
|
---|
131 | %{data_dir}/debug/credmmri.*
|
---|
132 | %{lang_dir}/net_*.msg
|
---|
133 | %license %{doc_dir}/LICENSE.ntlmcrsv
|
---|
134 | %license %{doc_dir}/GPL.txt
|
---|
135 | %license %{doc_dir}/LGPL.txt
|
---|
136 | %license %{doc_dir}/LICENSE.txt
|
---|
137 |
|
---|
138 |
|
---|
139 | %files qt
|
---|
140 | %dir %{doc_dir}
|
---|
141 | %dir %{data_dir}
|
---|
142 | %dir %{data_dir}/gui
|
---|
143 | %dir %{data_dir}/locale
|
---|
144 | %dir %{data_dir}/debug
|
---|
145 | %{_bindir}/browse.exe
|
---|
146 | %{_bindir}/connect.exe
|
---|
147 | %{_bindir}/credman.exe
|
---|
148 | %{data_dir}/gui/*
|
---|
149 | %{data_dir}/locale/*
|
---|
150 | %{data_dir}/debug/browse.*
|
---|
151 | %{data_dir}/debug/connect.*
|
---|
152 | %{data_dir}/debug/credman.*
|
---|
153 | %doc %{help_dir}/browse*.hlp
|
---|
154 | %doc %{help_dir}/connect*.hlp
|
---|
155 | %doc %{help_dir}/credman*.hlp
|
---|
156 |
|
---|
157 |
|
---|
158 | %clean
|
---|
159 | rm -rf $RPM_BUILD_ROOT
|
---|
160 |
|
---|
161 |
|
---|
162 | ###### Base package post-install ######
|
---|
163 |
|
---|
164 | %post -e
|
---|
165 | if [ "$1" -ge 1 ]; then # (upon update)
|
---|
166 | %wps_object_delete_all
|
---|
167 | fi
|
---|
168 | %wps_object_create_begin
|
---|
169 | ARCAMAP_FOLDER:WPFolder|ArcaMapper^Network Connections|<WP_CONNECTIONSFOLDER>|ICONVIEW=FLOWED,VISIBLE,NORMAL;TREEVIEW=LINES,VISIBLE,MINI;DEFAULTSORT=-2;ALWAYSSORT=NO;ICONFILE=((%{data_dir}/gui/folder1.ico));ICONNFILE=((%{data_dir}/gui/folder2.ico));
|
---|
170 | ARCAMAP_LOGON:WPProgram|Manage Credentials|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/pmcred.exe));PROGTYPE=PM;
|
---|
171 | %wps_object_create_end
|
---|
172 |
|
---|
173 | # Update CONFIG.SYS
|
---|
174 | #
|
---|
175 | m1=$(md5sum "%%{os2_config_sys}")
|
---|
176 | %cube {ADDLINE "RUN=%%{os2_unixroot_path}\usr\bin\ntlmcrsv.exe" (AFTER} %%{os2_config_sys} >nul
|
---|
177 | %cube {ADDSTRING "%%{os2_unixroot_path}\usr\share\os2\help;" IN "SET HELP=" (ALL AFTER} %%{os2_config_sys} >nul
|
---|
178 | %cube {ADDSTRING "%%{os2_unixroot_path}\usr\share\os2\lang;" IN "SET DPATH=" (ALL AFTER} %%{os2_config_sys} >nul
|
---|
179 | m2=$(md5sum "%%{os2_config_sys}")
|
---|
180 | if [ "$m2" != "$m1" ]; then
|
---|
181 | echo; echo "NOTE:"
|
---|
182 | echo; echo "CONFIG.SYS has been updated. You will need to reboot your computer"
|
---|
183 | echo "in order to activate these changes."
|
---|
184 | echo
|
---|
185 | fi
|
---|
186 | # Start the credential daemon
|
---|
187 | cmd /c detach ntlmcrsv.exe
|
---|
188 |
|
---|
189 |
|
---|
190 | ###### Qt UI package post-install ######
|
---|
191 |
|
---|
192 | %post qt -e
|
---|
193 | if [ "$1" -ge 1 ]; then # (upon update)
|
---|
194 | %wps_object_delete_all -n %{name}-qt
|
---|
195 | fi
|
---|
196 | %wps_object_create_begin
|
---|
197 | ARCAMAP_LOGON:WPProgram|Logon^(New Credentials)|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/credman.exe));PROGTYPE=PM;
|
---|
198 | ARCAMAP_LOGOFF:WPProgram|Active Credentials^(Manage)|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/credman.exe));PROGTYPE=PM;PARAMETERS=/manage;ICONFILE=((%{data_dir}/gui/logoff.ico));
|
---|
199 | ARCAMAP_CONNECT:WPProgram|New Connection|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/connect.exe));PROGTYPE=PM;
|
---|
200 | ARCAMAP_MANAGE:WPProgram|Manage Connections|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/connect.exe));PROGTYPE=PM;PARAMETERS=/manage;ICONFILE=((%{data_dir}/gui/manage.ico));
|
---|
201 | ARCAMAP_RESTORE:WPProgram|Restore Connections|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/connect.exe));PROGTYPE=PM;PARAMETERS=/restore;ICONFILE=((%{data_dir}/gui/restore.ico));
|
---|
202 | ARCAMAP_PREFS:WPProgram|Preferences|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/connect.exe));PROGTYPE=PM;PARAMETERS=/pref;ICONFILE=((%{data_dir}/gui/manage.ico));
|
---|
203 | ARCAMAP_BROWSER:WPProgram|Network Browser|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/browse.exe));PROGTYPE=PM;
|
---|
204 | %wps_object_create_end
|
---|
205 |
|
---|
206 |
|
---|
207 | ###### Base package post-uninstall ######
|
---|
208 |
|
---|
209 | %postun
|
---|
210 | if [ "$1" -eq 0 ]; then # (upon removal)
|
---|
211 | %wps_object_delete_all -n %{name}
|
---|
212 | fi
|
---|
213 | m1=$(md5sum "%%{os2_config_sys}")
|
---|
214 | %cube {DELLINE "RUN=%%{os2_unixroot_path}\usr\bin\ntlmcrsv.exe" (ALL} %%{os2_config_sys} >nul
|
---|
215 | # No need to delete the HELP and DPATH entries from CONFIG.SYS
|
---|
216 | m2=$(md5sum "%%{os2_config_sys}")
|
---|
217 | if [ "$m2" != "$m1" ]; then
|
---|
218 | echo; echo "NOTE:"
|
---|
219 | echo; echo "CONFIG.SYS has been updated. You will need to reboot your computer"
|
---|
220 | echo "in order to activate these changes."
|
---|
221 | echo
|
---|
222 | fi
|
---|
223 |
|
---|
224 |
|
---|
225 | ###### Qt UI package post-uninstall ######
|
---|
226 |
|
---|
227 | %postun qt
|
---|
228 | if [ "$1" -eq 0 ]; then # (upon removal)
|
---|
229 | %wps_object_delete_all -n %{name}-qt
|
---|
230 | fi
|
---|
231 |
|
---|
232 |
|
---|