e99d360
# Force out of source build
e99d360
%undefine __cmake_in_source_build
e99d360
dadab4a
%global with_sysfs 1
31bb5d6
%global with_opcua 0
c5ca13b
%global with_paho 1
1833f19
%global with_modbus 1
628c309
ab38898
# LuaJIT is only available on i686, x86_64, and aarch64
ab38898
%ifarch i686 x86_64 aarch64
ab38898
%global with_lua 0
ab38898
%global with_luajit 1
ab38898
%else
ab38898
%global with_lua 1
ab38898
%global with_luajit 0
ab38898
%endif
ab38898
628c309
Name:     4diac-forte
be4db31
Version:  2.0.1
c025d28
Release:  3%{?dist}
628c309
Summary:  IEC 61499 runtime environment
be4db31
License:  EPL-2.0
628c309
URL:      http://eclipse.org/4diac
22433c8
Source0:  https://git.eclipse.org/c/4diac/org.eclipse.4diac.forte.git/snapshot/org.eclipse.4diac.forte-%{version}.tar.gz
628c309
e3e1405
BuildRequires: cmake
814a475
BuildRequires: make
e3e1405
BuildRequires: gcc-c++
628c309
BuildRequires: systemd
e3e1405
%{?systemd_requires}
628c309
dadab4a
%if 0%{?with_opcua}
0289409
BuildRequires: open62541-devel >= 1.0
628c309
%endif
628c309
dadab4a
%if 0%{?with_lua}
628c309
BuildRequires: lua-devel >= 5.1
628c309
%endif
628c309
5fd50e6
%if 0%{?with_luajit}
5fd50e6
BuildRequires: luajit-devel >= 2.1.0
5fd50e6
%endif
5fd50e6
c5ca13b
%if 0%{?with_paho}
c5ca13b
BuildRequires: paho-c-devel >= 1.3.9
c5ca13b
%endif
c5ca13b
1833f19
%if 0%{?with_modbus}
1833f19
BuildRequires: libmodbus-devel >= 3.1.6
1833f19
%endif
1833f19
628c309
%description
628c309
The 4DIAC runtime environment (4DIAC-RTE, FORTE) is a small portable
628c309
implementation of an IEC 61499 runtime environment targeting small
628c309
embedded control devices (16/32 Bit), implemented in C++. It supports
628c309
online-reconfiguration of its applications and the real-time capable
628c309
execution of all function block types provided by the IEC 61499 standard.
628c309
628c309
%prep
22433c8
%setup -q -n org.eclipse.4diac.forte-%{version}
628c309
628c309
%build
628c309
%cmake -DFORTE_ARCHITECTURE=Posix \
628c309
       -DFORTE_COM_ETH=ON \
628c309
       -DFORTE_COM_FBDK=ON \
628c309
       -DFORTE_COM_LOCAL=ON \
c5ca13b
%if 0%{?with_paho}
c5ca13b
       -DFORTE_COM_PAHOMQTT=ON \
c5ca13b
%endif
1833f19
%if 0%{?with_modbus}
1833f19
       -DFORTE_COM_MODBUS=ON \
1833f19
%endif
e3e1405
%if 0%{?with_opcua}
814a475
       -DFORTE_COM_OPC_UA=ON -DFORTE_COM_OPC_UA_INCLUDE_DIR=%{_includedir} -DFORTE_COM_OPC_UA_LIB_DIR=%{_libdir} -DFORTE_COM_OPC_UA_LIB=libopen62541.so -DFORTE_COM_OPC_UA_MASTER_BRANCH=ON \
e3e1405
%endif
628c309
       -DFORTE_MODULE_CONVERT=ON \
628c309
       -DFORTE_MODULE_IEC61131=ON \
e3e1405
%if 0%{?with_sysfs}
e3e1405
       -DFORTE_MODULE_SysFs=ON \
e3e1405
%endif
628c309
       -DFORTE_MODULE_UTILS=ON \
53556f8
       -DFORTE_MODULE_IEC61131=ON \
e3e1405
%if 0%{?with_lua}
e3e1405
       -DFORTE_USE_LUATYPES=Lua \
e3e1405
%endif
e3e1405
%if 0%{?with_luajit}
cac41c3
       -DFORTE_USE_LUATYPES=LuaJIT -DLUAJIT_INCLUDE_DIR=%{_includedir}/luajit-2.1 -DLUAJIT_LIBRARY=%{_libdir}/libluajit-5.1.so \
e3e1405
%endif
e99d360
       -DFORTE_TESTS=OFF
e3e1405
e99d360
%cmake_build
628c309
628c309
%install
628c309
mkdir -p %{buildroot}%{_unitdir}
628c309
install -p systemd/4diac-forte.service %{buildroot}%{_unitdir}
628c309
628c309
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
628c309
install -p systemd/4diac-forte-sysconfig %{buildroot}%{_sysconfdir}/sysconfig/4diac-forte
628c309
e99d360
%cmake_install
628c309
628c309
%post
628c309
%systemd_post 4diac-forte.service
628c309
628c309
%preun
628c309
%systemd_preun 4diac-forte.service
628c309
628c309
%postun
628c309
%systemd_postun_with_restart 4diac-forte.service
628c309
628c309
%files
8f5811c
%license epl-2.0.html
628c309
%{_bindir}/forte
628c309
%{_unitdir}/4diac-forte.service
628c309
%config(noreplace) %{_sysconfdir}/sysconfig/4diac-forte
628c309
628c309
%changelog
c025d28
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-3
c025d28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
c025d28
47b2bf5
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.1-2
47b2bf5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
47b2bf5
cd9263f
* Fri Jul 15 2022 Jens Reimann <ctron@dentrassi.de> - 2.0.1-1
be4db31
- Update to version 2.0.1
c5ca13b
- Enable MQTT support using Eclipse Paho
1833f19
- Enable Modbus support
ab38898
- Enable JIT for Lua (i686, x86_64, aarch66 only)
53556f8
- Enable IEC-61131 module
be4db31
3ccee7b
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.0-7
3ccee7b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
3ccee7b
2b01e65
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.0-6
2b01e65
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2b01e65
7b9e2ed
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.12.0-5
7b9e2ed
- Rebuilt for updated systemd-rpm-macros
7b9e2ed
  See https://pagure.io/fesco/issue/2583.
7b9e2ed
1e714b6
* Mon Jan 25 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.0-4
1e714b6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
1e714b6
31bb5d6
* Mon Aug 24 2020 Jens Reimann <ctron@dentrassi.de> - 1.12.0-4
31bb5d6
- Disable OPC UA as doesn't work with the current release of libopen62541
31bb5d6
99a56c1
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.0-3
99a56c1
- Second attempt - Rebuilt for
99a56c1
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
99a56c1
9ed3b41
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.0-2
9ed3b41
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
9ed3b41
e99d360
* Sun Jul 05 2020 Neal Gompa <ngompa13@gmail.com> - 1.12.0-1
e99d360
- Update to release 1.12.0 to fix with CMake 3.17+
e99d360
7803292
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-2
7803292
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
7803292
0289409
* Mon Oct 07 2019 Jens Reimann <jreimann@redhat.com> - 1.11.0-1
0289409
- Update to release 1.11.0
0289409
6792656
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-5
6792656
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
6792656
e3e1405
* Tue Feb 12 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.9.0-4
e3e1405
- Build fixes and cleanup
e3e1405
0265066
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-3.1
0265066
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
0265066
8ac2674
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.0-2.1
8ac2674
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
8ac2674
94bbe17
* Thu Apr 19 2018 Jens Reimann <jreimann@redhat.com> - 1.9.0-1.1
22433c8
- Update to the final release 1.9.0
22433c8
- Enable Lua integration
22433c8
- Enable OPC UA integration
e3e1405
628c309
* Mon Feb 05 2018 Jens Reimann <jreimann@redhat.com> - 1.9.0.M3-0.1
628c309
- Initial version of the package