Skip to content

Commit c46bb40

Browse files
committed
v4.4.2
1 parent e1c3ca1 commit c46bb40

13 files changed

Lines changed: 73 additions & 82 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Fri Feb 24 2023 Maxime Dirksen - 4.4.2
2+
- Fix command not found
3+
- Smaller size
14
# Fri Feb 17 2023 Maxime Dirksen - 4.4.0
25
- Total rework of the implementation
36
- Support multiple emitters camera

README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ sudo rpm -iv --nodeps linux-enable-ir-emitter-*.rpm
2121
Download the deb package [here](https://github.com/EmixamPP/linux-enable-ir-emitter/releases/latest), then execute:
2222
```
2323
sudo dpkg -i linux-enable-ir-emitter-*.deb
24-
# "command not found" fix :
25-
sudo chmod +x /usr/lib/x86_64-linux-gnu/linux-enable-ir-emitter/linux-enable-ir-emitter.py
2624
```
2725

2826
### Arch distro based :
@@ -40,20 +38,15 @@ The following dependencies are needed (see [wiki](https://github.com/EmixamPP/li
4038
git clone https://github.com/EmixamPP/linux-enable-ir-emitter.git
4139
cd linux-enable-ir-emitter
4240
43-
# build a minimal version of opencv that will be staticaly linked
44-
# not required you can use the shared opencv library package of your distro
41+
# build a tiny version of opencv that will be statically linked
42+
# not required, you can use the shared opencv library package of your distro
4543
# but recommanded in order to do not have issues after distro updates
46-
wget -O opencv.zip https://github.com/opencv/opencv/archive/4.7.0.zip
47-
unzip opencv.zip
48-
mkdir -p opencv-4.7.0/build && cd opencv-4.7.0/build
49-
cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_LIST=videoio -DOPENCV_GENERATE_PKGCONFIG=YES -DCMAKE_INSTALL_PREFIX=./tmp_install
50-
cmake --build .
51-
make install
52-
cd ../../
44+
# if you do not understand what that means, do it
45+
sh build_opencv.sh
5346
5447
# build linux-enable-ir-emitter
55-
# remove the option --pkg-config-path if you didn't build opencv
56-
meson setup build --pkg-config-path opencv-4.7.0/build/tmp_install/lib*/pkgconfig
48+
# remove the option --pkg-config-path ... if you have not built opencv
49+
meson setup build --pkg-config-path opencv-*/build/install_dir/lib*/pkgconfig
5750
sudo meson install -C build
5851
5952
# if you are under Fedora or any system with SELinux

build_opencv.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
version=4.7.0
3+
4+
wget -O opencv.zip https://github.com/opencv/opencv/archive/${version}.zip
5+
unzip opencv.zip
6+
7+
mkdir -p opencv-4.7.0/build && cd opencv-${version}/build
8+
9+
cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_LIST=videoio -WITH_V4L=ON\
10+
-DOPENCV_GENERATE_PKGCONFIG=YES -DCMAKE_INSTALL_PREFIX=./install_dir \
11+
-DWITH_JPEG=OFF -DWITH_PNG=OFF -DWITH_TIFF=OFF -DWITH_WEBP=OFF -DWITH_OPENJPEG=OFF -DWITH_JASPER=OFF -DWITH_OPENEXR=OFF -DWITH_IMGCODEC_HDR=OFF -DWITH_IMGCODEC_SUNRASTER=OFF -DWITH_IMGCODEC_PXM=OFF -DWITH_IMGCODEC_PFM=OFF \
12+
-DWITH_FFMPEG=FALSE -DWITH_GSTREAMER=OFF -DWITH_1394=OFF -DDVIDEOIO_ENABLE_PLUGINS=OFF -DWITH_ANDROID_MEDIANDK=OFF \
13+
-DWITH_GTK=OFF -DHIGHGUI_ENABLE_PLUGINS=OFF -DWITH_VTK=OFF \
14+
-DWITH_PROTOBUF=OFF -DOPENCV_DNN_OPENCL=OFF \
15+
-DWITH_VA_INTEL=OFF -DWITH_OPENCL=OFF -DWITH_OPENCL_SVM=OFF -DWITH_OPENCLAMDFFT=OFF -DWITH_OPENCLAMDBLAS=OFF -DWITH_OPENCL_D3D11_NV=OFF \
16+
-DWITH_IPP=OFF -DWITH_CAROTENE=OFF -DWITH_CPUFEATURES=OFF -DWITH_EIGEN=OFF -DWITH_OPENVX=OFF -DWITH_DIRECTX=OFF -DWITH_VA=OFF -DWITH_LAPACK=OFF -DWITH_QUIRC=OFF
17+
18+
make && make install

fix_SELinux.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
#!/bin/sh
22

33
apply() {
4-
# equivalance rule between lib and lib64
54
semanage fcontext -a -t bin_t /usr/lib/linux-enable-ir-emitter/bin/execute-driver
65
semanage fcontext -a -t bin_t /usr/lib/linux-enable-ir-emitter/bin/driver-generator
7-
# linux-enable-ir-emitter can be installed in lib or lib64
8-
restorecon -v /usr/lib*/linux-enable-ir-emitter/bin/*
6+
restorecon -v /usr/lib64/linux-enable-ir-emitter/bin/*
97
}
108

119
undo() {

meson.build

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ project(
88
'optimization=3',
99
'warning_level=3',
1010
'prefix=/usr',
11-
'prefer_static=true',
12-
'default_library=static',
1311
],
1412
)
1513

16-
opencv_dep = dependency('opencv4')
14+
opencv_dep = dependency('opencv4', static: true)
1715

1816
executable(
1917
'driver-generator',
@@ -39,44 +37,41 @@ executable(
3937
)
4038

4139
install_data(
42-
[
43-
'LICENSE',
44-
'README.md',
45-
'sources/globals.py',
46-
'sources/linux-enable-ir-emitter.py'
47-
],
40+
'LICENSE',
41+
'README.md',
42+
'sources/globals.py',
4843
install_dir : get_option('libdir') / meson.project_name(),
4944
)
5045

46+
install_data(
47+
'sources/linux-enable-ir-emitter.py',
48+
install_dir : get_option('libdir') / meson.project_name(),
49+
install_mode: 'rwxr-xr-x',
50+
)
51+
5152
install_symlink(
5253
meson.project_name(),
5354
pointing_to: '../' / get_option('libdir') / meson.project_name() / 'linux-enable-ir-emitter.py',
5455
install_dir: get_option('bindir'),
5556
)
5657

5758
install_data(
58-
[
59-
'sources/command/__init__.py',
60-
'sources/command/boot.py',
61-
'sources/command/configure.py',
62-
'sources/command/delete.py',
63-
'sources/command/run.py',
64-
],
59+
'sources/command/__init__.py',
60+
'sources/command/boot.py',
61+
'sources/command/configure.py',
62+
'sources/command/delete.py',
63+
'sources/command/run.py',
6564
install_dir : get_option('libdir') / meson.project_name() / 'command',
6665
)
6766

6867
install_data(
69-
[
70-
'sources/systemd/__init__.py',
71-
'sources/systemd/Systemd.py',
72-
],
68+
'sources/systemd/__init__.py',
69+
'sources/systemd/Systemd.py',
7370
install_dir : get_option('libdir') / meson.project_name() / 'systemd',
7471
)
7572

7673
install_data(
77-
[
78-
'sources/systemd/linux-enable-ir-emitter.service',
79-
],
74+
'sources/systemd/linux-enable-ir-emitter.service',
8075
install_dir : 'lib/systemd/system',
8176
)
8277

@@ -86,8 +81,6 @@ install_subdir(
8681
)
8782

8883
install_data(
89-
[
90-
'sources/autocomplete/linux-enable-ir-emitter',
91-
],
84+
'sources/autocomplete/linux-enable-ir-emitter',
9285
install_dir : get_option('datadir') / 'bash-completion/completions',
9386
)

packages/debian/changelog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
linux-enable-ir-emitter (4.4.2) jammy; urgency=medium
2+
3+
* Fix command not found
4+
* Smaller size
5+
6+
-- Maxime Dirksen <dev@emixam.be> Fri, 24 Feb 2023 12:00:00 +0200
7+
18
linux-enable-ir-emitter (4.4.0) jammy; urgency=medium
29

310
* Total rework of the implementation

packages/debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Source: linux-enable-ir-emitter
22
Maintainer: Maxime Dirksen (EmixamPP) <dev@emixam.be>
33
Section: video
44
Priority: important
5-
Standards-Version: 4.4.0
5+
Standards-Version: 4.4.2
66
Build-Depends: debhelper, dh-make, fakeroot, meson (>= 0.61.0), cmake
77
Homepage: https://github.com/EmixamPP/linux-enable-ir-emitter
88

packages/debian/install

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/debian/rules

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@ opencv_version = 4.7.0
88
dh $@
99

1010
build:
11-
mkdir -p opencv-${opencv_version}/build
12-
cd opencv-${opencv_version}/build
13-
cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_LIST=videoio -DOPENCV_GENERATE_PKGCONFIG=YES -DCMAKE_INSTALL_PREFIX=./install_dir
14-
cmake --build .
15-
make install
16-
17-
cd ../../
11+
sh build_opencv.sh
1812
meson setup build --pkg-config-path opencv-${opencv_version}/build/install_dir/lib/pkgconfig/
1913

2014
override_dh_auto_install:

packages/fedora/linux-enable-ir-emitter.spec

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,38 @@
22
%global opencv_version 4.7.0
33

44
Name: linux-enable-ir-emitter
5-
Version: 4.4.0
6-
Release: 3%{?dist}
5+
Version: 4.4.2
6+
Release: 1%{?dist}
77
Summary: Enables infrared cameras that are not directly enabled out-of-the box
88
URL: https://github.com/EmixamPP/%{name}
99
License: MIT
1010

1111
Source0: https://github.com/EmixamPP/%{name}/archive/refs/tags/%{version}.tar.gz
12-
Source1: https://github.com/opencv/opencv/archive/%{opencv_version}.zip
13-
Source2: lib
1412

15-
16-
BuildRequires: meson >= 0.61.0
13+
BuildRequires: meson >= 0.63.0
1714
BuildRequires: cmake
1815

1916
Requires: python3 >= 3.6.2
17+
Requires: zlib
18+
Requires: libstdc++
19+
Requires: glibc
20+
Requires: libgcc
2021

2122

2223
%description
2324
Enables infrared cameras that are not directly enabled out-of-the box.
2425

2526
%prep
26-
tar -xzf %{SOURCE0}
27-
unzip %{SOURCE1}
27+
%autosetup
2828

2929
%build
30-
# build minimal opencv
31-
mkdir -p %{_builddir}/opencv-%{opencv_version}/build && cd %{_builddir}/opencv-%{opencv_version}/build
32-
cmake .. -DBUILD_SHARED_LIBS=OFF -DBUILD_LIST=videoio -DOPENCV_GENERATE_PKGCONFIG=YES -DCMAKE_INSTALL_PREFIX=./install_dir
33-
cmake --build .
34-
make install
35-
36-
# build linux-enable-ir-emitter
37-
cd %{_builddir}/%{name}-%{version}
38-
meson setup build --pkg-config-path %{_builddir}/opencv-%{opencv_version}/build/install_dir/lib64/pkgconfig
30+
sh build_opencv.sh
31+
meson setup build --pkg-config-path opencv-%{opencv_version}/build/install_dir/lib64/pkgconfig
3932

4033
%install
4134
# install linux-enable-ir-emitter
4235
DESTDIR=%{buildroot} meson install -C %{_builddir}/%{name}-%{version}/build
4336

44-
# install lib non statically linked to linux-enable-ir-emitter
45-
install -Dm 644 %{SOURCE2}/* -t %{buildroot}%{_libdir}/%{name}/lib
46-
4737
%files
4838
%{_libdir}/%{name}
4939
%{_sysconfdir}/%{name}
@@ -79,6 +69,9 @@ if [ "$1" -eq 0 ]; then
7969
fi
8070

8171
%changelog
72+
* Fri Feb 24 2023 Maxime Dirksen <dev@emixam.be> - 4.4.2-1
73+
- Fix command not found
74+
- Smaller size
8275
* Fri Feb 17 2023 Maxime Dirksen <dev@emixam.be> - 4.4.0-1
8376
- Total rework of the implementation
8477
- Support multiple emitters camera

0 commit comments

Comments
 (0)