ebusd: init at 23.2

This commit is contained in:
Nathan Bijnens 2023-07-20 19:40:30 +02:00 committed by Yt
parent e0536cfd75
commit 1f1dd2457a
3 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,50 @@
{ lib, stdenv, pkgs, fetchFromGitHub, argparse, mosquitto, cmake, autoconf, automake, libtool, pkg-config, openssl }:
stdenv.mkDerivation rec {
pname = "ebusd";
version = "23.2";
src = fetchFromGitHub {
owner = "john30";
repo = "ebusd";
rev = version;
sha256 = "2CkcTTxEzVrEPtUVVDxXPPkYqZT6+gsCcfTrt83sFv8=";
};
nativeBuildInputs = [
cmake
autoconf
automake
libtool
pkg-config
];
buildInputs = [
argparse
mosquitto
openssl
];
patches = [
./patches/ebusd-cmake.patch
];
cmakeFlags = [
"-DCMAKE_INSTALL_SYSCONFDIR=${placeholder "out"}/etc"
"-DCMAKE_INSTALL_BINDIR=${placeholder "out"}/bin"
"-DCMAKE_INSTALL_LOCALSTATEDIR=${placeholder "TMPDIR"}"
];
postInstall = ''
mv $out/usr/bin $out
rmdir $out/usr
'';
meta = with lib; {
description = "ebusd";
homepage = "https://github.com/john30/ebusd";
license = licenses.gpl3Only;
maintainers = with maintainers; [ nathan-gs ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,21 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -184,16 +184,11 @@
add_subdirectory(src/lib/knx)
add_subdirectory(src/tools)
-if(EXISTS "${ROOT}/etc/debian_version")
- install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/default/ebusd DESTINATION /etc/default/)
- install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/init.d/ebusd DESTINATION /etc/init.d/)
- install(FILES ${CMAKE_SOURCE_DIR}/contrib/debian/systemd/ebusd.service DESTINATION /lib/systemd/system/)
-endif()
if(HAVE_MQTT)
FILE(GLOB MQTT_CFG_FILES "${CMAKE_SOURCE_DIR}/contrib/etc/ebusd/mqtt-*.cfg")
- install(FILES ${MQTT_CFG_FILES} DESTINATION /etc/ebusd/)
+ install(FILES ${MQTT_CFG_FILES} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ebusd/)
endif(HAVE_MQTT)
if(HAVE_KNX)
FILE(GLOB KNX_CFG_FILES "${CMAKE_SOURCE_DIR}/contrib/etc/ebusd/knx*.cfg")
- install(FILES ${KNX_CFG_FILES} DESTINATION /etc/ebusd/)
+ install(FILES ${KNX_CFG_FILES} DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/ebusd/)
endif(HAVE_KNX)

View file

@ -583,6 +583,8 @@ with pkgs;
each = callPackage ../tools/text/each { };
ebusd = callPackage ../servers/ebusd { };
eclipse-mat = callPackage ../development/tools/eclipse-mat { };
edgedb = callPackage ../tools/networking/edgedb {