1 |
brianr |
1.1 |
%define name smeserver-manager-jsquery |
2 |
|
|
%define version 1.0 |
3 |
brianr |
1.4 |
%define release 4 |
4 |
brianr |
1.1 |
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 |
brianr |
1.2 |
Patch0: smeserver-manager-jsquery-1.0-Fix-css-override-for-dataTables.patch |
12 |
brianr |
1.3 |
Patch1: smeserver-manager-jsquery-1.0-Add-Export-Buttons-to-dataTable.patch |
13 |
brianr |
1.4 |
Patch2: smeserver-manager-jsquery-1.0-Add-Callback-in-dataTable-to-remake-buttons.patch |
14 |
brianr |
1.2 |
|
15 |
brianr |
1.1 |
BuildRoot: %{_tmppath}/%{name}-buildroot |
16 |
|
|
Prefix: %{_prefix} |
17 |
|
|
BuildArchitectures: noarch |
18 |
|
|
BuildRequires: e-smith-devtools |
19 |
|
|
Requires: e-smith-release >= 10.0 |
20 |
|
|
AutoReqProv: no |
21 |
|
|
|
22 |
|
|
%define dir_mngr /usr/share/smanager |
23 |
|
|
|
24 |
|
|
%description |
25 |
|
|
Jsquery and associated plugins plus server-manager (2) specific overrides. |
26 |
|
|
|
27 |
|
|
%changelog |
28 |
brianr |
1.4 |
* Thu Feb 08 2024 Brian Read <brianr@koozali.org> 1.0-4.sme |
29 |
|
|
- Add callback in dataTable to setup buttons in rows [SME: 12467] |
30 |
|
|
- Move dataTable js to seperate file (maybe template it at some point) |
31 |
|
|
|
32 |
brianr |
1.3 |
* Wed Feb 07 2024 Brian Read <brianr@koozali.org> 1.0-3.sme |
33 |
|
|
- Add export buttons to table using dataTables plugin [SME: 12466] |
34 |
|
|
|
35 |
brianr |
1.2 |
* Sun Feb 04 2024 Brian Read <brianr@koozali.org> 1.0-2.sme |
36 |
|
|
- Fix-css-override-for-dataTables [SME: 12465] |
37 |
|
|
|
38 |
brianr |
1.1 |
* Mon Jan 29 2024 <brianr@koozali.org> 1.0-1.sme |
39 |
|
|
- Initial code - create RPM [SME:12459] |
40 |
|
|
|
41 |
|
|
%prep |
42 |
|
|
|
43 |
|
|
%setup |
44 |
brianr |
1.2 |
%patch0 -p1 |
45 |
brianr |
1.3 |
%patch1 -p1 |
46 |
brianr |
1.4 |
%patch2 -p1 |
47 |
brianr |
1.1 |
|
48 |
|
|
%build |
49 |
|
|
perl createlinks |
50 |
|
|
|
51 |
|
|
%install |
52 |
|
|
rm -rf RPM_BUILD_ROOT |
53 |
|
|
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
54 |
|
|
rm -f %{name}-%{version}-filelist |
55 |
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
56 |
|
|
> %{name}-%{version}-filelist |
57 |
|
|
#echo "%doc COPYING" >> %{name}-%{version}-filelist |
58 |
|
|
#--dir <dir> 'attr(755,user,grp)' \ |
59 |
|
|
#--file <file> 'attr(755,root,root)' \ |
60 |
|
|
|
61 |
|
|
%clean |
62 |
|
|
cd .. |
63 |
|
|
rm -rf %{name}-%{version} |
64 |
|
|
|
65 |
|
|
%pre |
66 |
|
|
|
67 |
|
|
%preun |
68 |
|
|
|
69 |
|
|
%post |
70 |
|
|
if [ -f /usr/share/javascript/jquery/latest/jquery.min.js ] |
71 |
|
|
then |
72 |
|
|
[ -d %{dir_mngr}/themes/default/public/js ] || |
73 |
|
|
mkdir -p %{dir_mngr}/themes/default/public/js |
74 |
|
|
|
75 |
brianr |
1.3 |
[ -h %{dir_mngr}/themes/default/public/js/images ] || |
76 |
brianr |
1.1 |
ln -s /usr/share/javascript/jquery-ui/images %{dir_mngr}/themes/default/public/js/images |
77 |
|
|
|
78 |
|
|
|
79 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/jquery.min.js ] || |
80 |
|
|
ln -s /usr/share/javascript/jquery/latest/jquery.min.js %{dir_mngr}/themes/default/public/js/jquery.min.js |
81 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/jquery.min.map ] || |
82 |
|
|
ln -s /usr/share/javascript/jquery/latest/jquery.min.map %{dir_mngr}/themes/default/public/js/jquery.min.map |
83 |
|
|
|
84 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/datatables.min.js ] || |
85 |
|
|
ln -s /usr/share/javascript/datatables.min.js %{dir_mngr}/themes/default/public/js/datatables.min.js |
86 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/datatables.min.css ] || |
87 |
|
|
ln -s /usr/share/javascript/datatables.min.css %{dir_mngr}/themes/default/public/js/datatables.min.css |
88 |
|
|
|
89 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/jquery-ui.min.js ] || |
90 |
|
|
ln -s /usr/share/javascript/jquery-ui/jquery-ui.min.js %{dir_mngr}/themes/default/public/js/jquery-ui.min.js |
91 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/jquery-ui.min.css ] || |
92 |
|
|
ln -s /usr/share/javascript/jquery-ui/jquery-ui.min.css %{dir_mngr}/themes/default/public/js/jquery-ui.min.css |
93 |
brianr |
1.3 |
|
94 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/dataTables.buttons.min.js ] || |
95 |
|
|
ln -s /usr/share/javascript/dataTables.buttons.min.js %{dir_mngr}/themes/default/public/js/dataTables.buttons.min.js |
96 |
|
|
|
97 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/jszip.min.js ] || |
98 |
|
|
ln -s /usr/share/javascript/jszip/jszip.min.js %{dir_mngr}/themes/default/public/js/jszip.min.js |
99 |
|
|
|
100 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/pdfmake.min.js ] || |
101 |
|
|
ln -s /usr/share/javascript/pdfmake/pdfmake.min.js %{dir_mngr}/themes/default/public/js/pdfmake.min.js |
102 |
|
|
|
103 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/vfs_fonts.js ] || |
104 |
|
|
ln -s /usr/share/javascript/pdfmake/vfs_fonts.js %{dir_mngr}/themes/default/public/js/vfs_fonts.js |
105 |
|
|
|
106 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/buttons.html5.min.js ] || |
107 |
|
|
ln -s /usr/share/javascript/buttons/buttons.html5.min.js %{dir_mngr}/themes/default/public/js/buttons.html5.min.js |
108 |
|
|
|
109 |
|
|
[ -h %{dir_mngr}/themes/default/public/js/buttons.print.min.js ] || |
110 |
|
|
ln -s /usr/share/javascript/buttons/buttons.print.min.js %{dir_mngr}/themes/default/public/js/buttons.print.min.js |
111 |
brianr |
1.1 |
|
112 |
|
|
|
113 |
|
|
fi |
114 |
|
|
true |
115 |
|
|
|
116 |
|
|
|
117 |
|
|
%postun |
118 |
|
|
#uninstall |
119 |
|
|
%files -f %{name}-%{version}-filelist |
120 |
|
|
%defattr(-,root,root) |