1 |
brianr |
1.1 |
%define name smeserver-manager-jsquery |
2 |
|
|
%define version 1.0 |
3 |
|
|
%define release 1 |
4 |
|
|
Summary: Jsquery and associated plugins plus server-manager (2) specific overrides. |
5 |
|
|
Name: %{name} |
6 |
|
|
Version: %{version} |
7 |
|
|
Release: %{release}%{?dist} |
8 |
|
|
Source: %{name}-%{version}.tar.gz |
9 |
|
|
License: GNU GPL version 2 |
10 |
|
|
Group: SMEserver/addon |
11 |
|
|
BuildRoot: %{_tmppath}/%{name}-buildroot |
12 |
|
|
Prefix: %{_prefix} |
13 |
|
|
BuildArchitectures: noarch |
14 |
|
|
BuildRequires: e-smith-devtools |
15 |
|
|
Requires: e-smith-release >= 10.0 |
16 |
|
|
AutoReqProv: no |
17 |
|
|
|
18 |
|
|
%define dir_mngr /usr/share/smanager |
19 |
|
|
|
20 |
|
|
%description |
21 |
|
|
Jsquery and associated plugins plus server-manager (2) specific overrides. |
22 |
|
|
|
23 |
|
|
%changelog |
24 |
|
|
* Mon Jan 29 2024 <brianr@koozali.org> 1.0-1.sme |
25 |
|
|
- Initial code - create RPM [SME:12459] |
26 |
|
|
|
27 |
|
|
%prep |
28 |
|
|
|
29 |
|
|
%setup |
30 |
|
|
|
31 |
|
|
%build |
32 |
|
|
perl createlinks |
33 |
|
|
|
34 |
|
|
%install |
35 |
|
|
rm -rf RPM_BUILD_ROOT |
36 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
37 |
|
|
rm -f %{name}-%{version}-filelist |
38 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
39 |
|
|
> %{name}-%{version}-filelist |
40 |
|
|
#echo "%doc COPYING" >> %{name}-%{version}-filelist |
41 |
|
|
#--dir <dir> 'attr(755,user,grp)' \ |
42 |
|
|
#--file <file> 'attr(755,root,root)' \ |
43 |
|
|
|
44 |
|
|
%clean |
45 |
|
|
cd .. |
46 |
|
|
rm -rf %{name}-%{version} |
47 |
|
|
|
48 |
|
|
%pre |
49 |
|
|
|
50 |
|
|
%preun |
51 |
|
|
|
52 |
|
|
%post |
53 |
|
|
if [ -f /usr/share/javascript/jquery/latest/jquery.min.js ] |
54 |
|
|
then |
55 |
|
|
[ -d %{dir_mngr}/themes/default/public/js ] || |
56 |
|
|
mkdir -p %{dir_mngr}/themes/default/public/js |
57 |
|
|
|
58 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/images ] || |
59 |
|
|
ln -s /usr/share/javascript/jquery-ui/images %{dir_mngr}/themes/default/public/js/images |
60 |
|
|
|
61 |
|
|
|
62 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/jquery.min.js ] || |
63 |
|
|
ln -s /usr/share/javascript/jquery/latest/jquery.min.js %{dir_mngr}/themes/default/public/js/jquery.min.js |
64 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/jquery.min.map ] || |
65 |
|
|
ln -s /usr/share/javascript/jquery/latest/jquery.min.map %{dir_mngr}/themes/default/public/js/jquery.min.map |
66 |
|
|
|
67 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/datatables.min.js ] || |
68 |
|
|
ln -s /usr/share/javascript/datatables.min.js %{dir_mngr}/themes/default/public/js/datatables.min.js |
69 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/datatables.min.css ] || |
70 |
|
|
ln -s /usr/share/javascript/datatables.min.css %{dir_mngr}/themes/default/public/js/datatables.min.css |
71 |
|
|
|
72 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/jquery-ui.min.js ] || |
73 |
|
|
ln -s /usr/share/javascript/jquery-ui/jquery-ui.min.js %{dir_mngr}/themes/default/public/js/jquery-ui.min.js |
74 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/jquery-ui.min.css ] || |
75 |
|
|
ln -s /usr/share/javascript/jquery-ui/jquery-ui.min.css %{dir_mngr}/themes/default/public/js/jquery-ui.min.css |
76 |
|
|
|
77 |
|
|
|
78 |
|
|
fi |
79 |
|
|
true |
80 |
|
|
|
81 |
|
|
|
82 |
|
|
%postun |
83 |
|
|
#uninstall |
84 |
|
|
%files -f %{name}-%{version}-filelist |
85 |
|
|
%defattr(-,root,root) |