forked from displaylink-rpm/displaylink-rpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
displaylink.spec
208 lines (156 loc) · 6.65 KB
/
displaylink.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
%global debug_package %{nil}
%if 0%{?rhel}
%global kernel_pkg_name kernel-mt
%else
%global kernel_pkg_name kernel
%endif
Name: displaylink
Version: %{_version}
Release: %{_release}
Summary: DisplayLink VGA/HDMI driver for DL-6xxx, DL-5xxx, DL-41xx and DL-3xxx adapters
Group: User Interface/X Hardware Support
License: GPL v2.0, LGPL v2.1 and Proprietary
Source0: https://github.com/DisplayLink/evdi/archive/v%{version}.tar.gz
Source1: displaylink.service
Source2: 99-displaylink.rules
Source3: displaylink-sleep-extractor.sh
# From http://www.displaylink.com/downloads/ubuntu.php
Source4: DisplayLink USB Graphics Software for Ubuntu %{_daemon_version}.zip
Source5: 20-displaylink.conf
ExclusiveArch: i386 x86_64
BuildRequires: libdrm-devel
Requires: dkms, %{kernel_pkg_name} > 4.7, %{kernel_pkg_name}-devel > 4.7
%description
This adds support for HDMI/VGA adapters built upon the DisplayLink DL-6xxx,
DL-5xxx, DL-41xx and DL-3xxx series of chipsets. This includes numerous
docking stations, USB monitors, and USB adapters.
%define logfile /var/log/displaylink/%{name}.log
%prep
%setup -q -c evdi-%{version}
cd evdi-%{version}
sed -i 's/\r//' README.md
unzip "%{SOURCE4}"
chmod +x displaylink-driver-%{_daemon_version}.run
./displaylink-driver-%{_daemon_version}.run --noexec --keep
# This creates a displaylink-driver-$version subdirectory
%build
cd evdi-%{version}/library/
make %{?_smp_mflags}
%install
mkdir -p $RPM_BUILD_ROOT/usr/libexec/displaylink/ \
$RPM_BUILD_ROOT/usr/src/evdi-%{version}/ \
$RPM_BUILD_ROOT/usr/lib/systemd/system/ \
$RPM_BUILD_ROOT/usr/lib/systemd/system-sleep \
$RPM_BUILD_ROOT/etc/udev/rules.d/ \
$RPM_BUILD_ROOT/etc/X11/xorg.conf.d/ \
$RPM_BUILD_ROOT/var/log/displaylink/
# Kernel driver sources
pushd $RPM_BUILD_ROOT/usr/src/evdi-%{version} ; \
cp -a $OLDPWD/evdi-%{version}/module/* . ; \
popd
# Library
cp evdi-%{version}/library/libevdi.so $RPM_BUILD_ROOT/usr/libexec/displaylink
# Binaries
# Don't copy libusb-1.0.so.0.1.0 it's already shipped by libusbx
# Don't copy libevdi.so, we compiled it from source
cd evdi-%{version}/displaylink-driver-%{_daemon_version}
cp LICENSE ../..
%ifarch x86_64
cp -a x64-ubuntu-1604/DisplayLinkManager $RPM_BUILD_ROOT/usr/libexec/displaylink/
%endif
%ifarch %ix86
cp -a x86-ubuntu-1604/DisplayLinkManager $RPM_BUILD_ROOT/usr/libexec/displaylink/
%endif
# Firmwares
cp -a ella-dock-release.spkg firefly-monitor-release.spkg $RPM_BUILD_ROOT/usr/libexec/displaylink/
# systemd/udev
cp -a %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/systemd/system/
cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/udev/rules.d/
cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/
# pm-util
bash %{SOURCE3} displaylink-installer.sh > $RPM_BUILD_ROOT/usr/lib/systemd/system-sleep/displaylink.sh
chmod +x $RPM_BUILD_ROOT/usr/lib/systemd/system-sleep/displaylink.sh
%post
# The displaylink service may crash as dkms rebuilds the module
/usr/bin/systemctl -q is-active displaylink.service && /usr/bin/systemctl stop displaylink.service
/usr/bin/systemctl daemon-reload
/usr/bin/systemctl -q is-enabled dkms.service || /usr/bin/systemctl enable dkms.service
/sbin/dkms install evdi/%{version} >> %{logfile} 2>&1
/usr/bin/systemctl start displaylink.service
%files
%doc LICENSE
/usr/lib/systemd/system/displaylink.service
/usr/lib/systemd/system-sleep/displaylink.sh
/etc/udev/rules.d/99-displaylink.rules
/etc/X11/xorg.conf.d/20-displaylink.conf
%dir /usr/src/evdi-%{version}
/usr/src/evdi-%{version}/*
%dir /usr/libexec/displaylink
/usr/libexec/displaylink/*
%dir /var/log/displaylink/
%preun
if [ $1 -eq 0 ] ;then
/usr/bin/systemctl -q is-active displaylink.service && /usr/bin/systemctl stop displaylink.service
/sbin/dkms remove evdi/%{version} --all >> %{logfile}
fi
%postun
/usr/bin/systemctl daemon-reload
%changelog
* Sat Oct 27 2018 fgiff <[email protected]> 1.5.0-3
- Bump downloaded version to 4.4.24
* Wed Jan 17 2018 fgiff <[email protected]> 1.5.0-2
- Bump downloaded version to 4.1.9
* Tue Oct 10 2017 Alan Halama <[email protected]> 1.5
- Update evdi version to 1.5
- Bump downloaded version to 1.4
* Thu Aug 17 2017 Kahlil Hodgson <[email protected]> 1.1.4-5
- Restart displaylink service around dkms rebuild
- Make setup quiet as per fedora/redhat guidelines
* Wed Jul 26 2017 Kahlil Hodgson <[email protected]> 1.1.4-4
- Give systemd sleep script exec permissions
* Tue Jul 11 2017 Kahlil Hodgson <[email protected]> 1.1.4-3
- Disable PageFlip if xorg is using modesetting driver
* Sat Jul 8 2017 Alan Halama <[email protected]> 1.3.54
- Bump downloaded version to 1.3.54
* Thu Jun 8 2017 Alan Halama <[email protected]> 1.4.1
- Update evdi version to 1.4.1
* Sun Feb 19 2017 Richard Hofer <[email protected]> 1.3.52
- Bump downloaded version to 1.3.52
- Note support for DL-6xxx devices
* Tue Oct 11 2016 Aaron Aichlmayr <[email protected]> 1.2.64
- Bump downloaded version to 1.2.64
* Tue Oct 04 2016 Victor Rehorst <[email protected]> 1.2.55-2
- Fix systemd-sleep support for DisplayLink driver 1.2.58 (which is now current for v1.2)
* Thu Sep 22 2016 Santiago Saavedra <[email protected]> 1.2.55-1
- Bump upstream version for both evdi and DisplayLink driver
* Mon May 30 2016 Santiago Saavedra <[email protected]> 1.1.65-5
- Add systemd-sleep support
* Tue May 24 2016 Bastien Nocera <[email protected]> 1.1.65-4
- Really copy the libevdi.so from the sources
* Sun May 22 2016 Bastien Nocera <[email protected]> 1.1.65-3
- Add missing libdrm-devel BR
* Tue May 17 2016 Bastien Nocera <[email protected]> 1.1.65-2
- Update to daemon 1.1.62 (with a zip file called 1.1.68, sigh)
* Tue May 17 2016 Bastien Nocera <[email protected]> 1.1.65-1
- Update to 1.1.65
* Tue May 10 2016 Bastien Nocera <[email protected]> 1.1.61-1
- Update to 1.1.61
* Thu Apr 28 2016 Bastien Nocera <[email protected]> 1.0.453-1
- Update to 1.0.453
- Compile the library from source
* Mon Dec 14 2015 Bastien Nocera <[email protected]> 1.0.335-1
- Update to 1.0.335
* Mon Sep 07 2015 Bastien Nocera <[email protected]> 1.0.138-4
- Disable debuginfo subpackage creation
* Mon Sep 07 2015 Bastien Nocera <[email protected]> 1.0.138-3
- Create RPM directly from downloaded zip file
- Add LICENSE
- Create i386 RPM
* Sun Sep 6 2015 Eric Nothen <[email protected]> - 1.0.138-2
- Modified installed kernels detection section to be more precise
* Wed Sep 2 2015 Eric Nothen <[email protected]> - 1.0.138-1
- Updated driver to version 1.0.138, as published by DisplayLink
* Wed Aug 19 2015 Eric Nothen <[email protected]> - 1.0.68-2
- Changed udev rule to detect devices based on vendor rather than model
* Thu Aug 13 2015 Eric Nothen <[email protected]> - 1.0.68-1
- Initial package based on module version 1.0.68 available at http://www.displaylink.com/downloads/ubuntu.php