Ticket #353: arcamapper.spec

File arcamapper.spec, 7.7 KB (added by Alex Taylor, 2 years ago)

SPEC file being used

Line 
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
16Summary: ArcaMapper LAN client user interface
17Name: arcamapper-ui
18Version: %{version}
19Release: %{release}
20License: Various
21Group: Networking/Other
22#Source: %{name}-%{version}.zip
23%scm_source svn https://svn.arcanoae.com/arcamapper/trunk %{repo_ver}
24Requires: libc libgcc-fwd libgcc libcx libstdc++
25Requires: heimdal heimdal-libs
26BuildRequires: gcc
27BuildRequires: libc-devel
28BuildRoot: %{_topdir}/BUILDROOT/%{name}-%{version}-%{release}
29BuildArch: 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
38ArcaMapper UI is a set of user interface tools for the ArcaOS LAN client
39based on NetDrive and the NDPSMB plugin.
40
41
42###### Qt UI package info ######
43
44%package qt
45
46Requires: arcamapper-ui >= %{version}
47Requires: libqt4-gui
48BuildRequires: qt4-devel-kit
49Summary: ArcaMapper LAN client user interface, Qt based
50Group: Networking/Other
51
52%description qt
53A Qt-based graphical user interface for ArcaMapper UI, the ArcaOS LAN
54client based on NetDrive and the NDPSMB plugin.
55
56
57
58###### Common setup ######
59
60%prep
61%scm_setup
62
63
64%build
65make all
66
67
68%install
69rm -rf $RPM_BUILD_ROOT
70echo Copying files to $RPM_BUILD_ROOT ...
71mkdir -p $RPM_BUILD_ROOT%{_bindir}
72mkdir -p $RPM_BUILD_ROOT%{_libdir}
73mkdir -p $RPM_BUILD_ROOT%{doc_dir}
74mkdir -p $RPM_BUILD_ROOT%{lang_dir}
75mkdir -p $RPM_BUILD_ROOT%{help_dir}
76mkdir -p $RPM_BUILD_ROOT%{data_dir}/debug
77mkdir -p $RPM_BUILD_ROOT%{data_dir}/gui
78mkdir -p $RPM_BUILD_ROOT%{data_dir}/locale
79cp install/*.ico $RPM_BUILD_ROOT%{data_dir}/gui
80cp browse/browse.exe $RPM_BUILD_ROOT%{_bindir}
81cp browse/browse.map $RPM_BUILD_ROOT%{data_dir}/debug
82cp browse/browse.sym $RPM_BUILD_ROOT%{data_dir}/debug
83cp browse/language/*.qm $RPM_BUILD_ROOT%{data_dir}/locale
84cp browse/help/browse*.hlp $RPM_BUILD_ROOT%{help_dir}
85cp connect/connect.exe $RPM_BUILD_ROOT%{_bindir}
86cp connect/connect.map $RPM_BUILD_ROOT%{data_dir}/debug
87cp connect/connect.sym $RPM_BUILD_ROOT%{data_dir}/debug
88cp connect/language/*.qm $RPM_BUILD_ROOT%{data_dir}/locale
89cp connect/help/connect*.hlp $RPM_BUILD_ROOT%{help_dir}
90cp credman/credman.exe $RPM_BUILD_ROOT%{_bindir}
91cp credman/credman.map $RPM_BUILD_ROOT%{data_dir}/debug
92cp credman/credman.sym $RPM_BUILD_ROOT%{data_dir}/debug
93cp credman/language/*.qm $RPM_BUILD_ROOT%{data_dir}/locale
94cp credman/help/credman*.hlp $RPM_BUILD_ROOT%{help_dir}
95cp ntlmcred/ntlmcrsv.exe $RPM_BUILD_ROOT%{_bindir}
96cp ntlmcred/ntlmcrsv.map $RPM_BUILD_ROOT%{data_dir}/debug
97cp ntlmcred/ntlmcrsv.sym $RPM_BUILD_ROOT%{data_dir}/debug
98cp ntlmcred/LICENSE.ntlmcrsv $RPM_BUILD_ROOT%{doc_dir}/LICENSE.ntlmcrsv
99cp pmcred/pmcred.exe $RPM_BUILD_ROOT%{_bindir}
100cp pmcred/pmcred.map $RPM_BUILD_ROOT%{data_dir}/debug
101cp pmcred/pmcred.sym $RPM_BUILD_ROOT%{data_dir}/debug
102cp pmcred/credmmri.dll $RPM_BUILD_ROOT%{_libdir}
103cp pmcred/credmmri.map $RPM_BUILD_ROOT%{data_dir}/debug
104cp net/net.cmd $RPM_BUILD_ROOT%{_bindir}
105cp net/net_nd.exe $RPM_BUILD_ROOT%{_bindir}
106cp net/net_s.exe $RPM_BUILD_ROOT%{_bindir}
107cp net/net_*.msg $RPM_BUILD_ROOT%{lang_dir}
108cp net/net_nd.map $RPM_BUILD_ROOT%{data_dir}/debug
109cp net/net_s.map $RPM_BUILD_ROOT%{data_dir}/debug
110cp LICENSE.txt $RPM_BUILD_ROOT%{doc_dir}/LICENSE.txt
111cp common/GPL.txt $RPM_BUILD_ROOT%{doc_dir}/GPL.txt
112cp 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
159rm -rf $RPM_BUILD_ROOT
160
161
162###### Base package post-install ######
163
164%post -e
165if [ "$1" -ge 1 ]; then # (upon update)
166 %wps_object_delete_all
167fi
168%wps_object_create_begin
169ARCAMAP_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));
170ARCAMAP_LOGON:WPProgram|Manage Credentials|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/pmcred.exe));PROGTYPE=PM;
171%wps_object_create_end
172
173# Update CONFIG.SYS
174#
175m1=$(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
179m2=$(md5sum "%%{os2_config_sys}")
180if [ "$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
185fi
186# Start the credential daemon
187cmd /c detach ntlmcrsv.exe
188
189
190###### Qt UI package post-install ######
191
192%post qt -e
193if [ "$1" -ge 1 ]; then # (upon update)
194 %wps_object_delete_all -n %{name}-qt
195fi
196%wps_object_create_begin
197ARCAMAP_LOGON:WPProgram|Logon^(New Credentials)|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/credman.exe));PROGTYPE=PM;
198ARCAMAP_LOGOFF:WPProgram|Active Credentials^(Manage)|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/credman.exe));PROGTYPE=PM;PARAMETERS=/manage;ICONFILE=((%{data_dir}/gui/logoff.ico));
199ARCAMAP_CONNECT:WPProgram|New Connection|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/connect.exe));PROGTYPE=PM;
200ARCAMAP_MANAGE:WPProgram|Manage Connections|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/connect.exe));PROGTYPE=PM;PARAMETERS=/manage;ICONFILE=((%{data_dir}/gui/manage.ico));
201ARCAMAP_RESTORE:WPProgram|Restore Connections|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/connect.exe));PROGTYPE=PM;PARAMETERS=/restore;ICONFILE=((%{data_dir}/gui/restore.ico));
202ARCAMAP_PREFS:WPProgram|Preferences|<ARCAMAP_FOLDER>|EXENAME=((%{_bindir}/connect.exe));PROGTYPE=PM;PARAMETERS=/pref;ICONFILE=((%{data_dir}/gui/manage.ico));
203ARCAMAP_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
210if [ "$1" -eq 0 ]; then # (upon removal)
211 %wps_object_delete_all -n %{name}
212fi
213m1=$(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
216m2=$(md5sum "%%{os2_config_sys}")
217if [ "$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
222fi
223
224
225###### Qt UI package post-uninstall ######
226
227%postun qt
228if [ "$1" -eq 0 ]; then # (upon removal)
229 %wps_object_delete_all -n %{name}-qt
230fi
231
232