Skip to content

Commit

Permalink
uhub: 0.4.1 -> 0.5.0 (fixes build)
Browse files Browse the repository at this point in the history
@ehmry: please have a look so that we can cherry-pick in release-16.09
and move forward on NixOS#18209
  • Loading branch information
obadz committed Sep 7, 2016
1 parent 1c7270f commit 39e197a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 184 deletions.
19 changes: 13 additions & 6 deletions pkgs/servers/uhub/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

assert tlsSupport -> openssl != null;

let version = "0.4.1"; in
stdenv.mkDerivation {
stdenv.mkDerivation rec {
name = "uhub-${version}";
version = "0.5.0";

src = fetchurl {
url = "http://www.extatic.org/downloads/uhub/uhub-${version}-src.tar.bz2";
sha256 = "1q0n74fb0h5w0k9fhfkznxb4r46qyfb8g2ss3wflivx4l0m1f9x2";
sha256 = "1xcqjz20lxikzn96f4f69mqyl9y985h9g0gyc9f7ckj18q22b5j5";
};

buildInputs = [ cmake sqlite pkgconfig systemd ] ++ stdenv.lib.optional tlsSupport openssl;
Expand All @@ -19,14 +19,21 @@ stdenv.mkDerivation {
"mod_welcome"
"mod_logging"
"mod_auth_simple"
"mod_auth_sqlite"
"mod_chat_history"
"mod_chat_only"
"mod_topic"
"mod_no_guest_downloads"
];

patches = [ ./plugin-dir.patch ./systemd.patch ];
patches = [
./plugin-dir.patch

# Fixed compilation on systemd > 210
(fetchurl {
url = "https://github.com/janvidar/uhub/commit/70f2a43f676cdda5961950a8d9a21e12d34993f8.diff";
sha256 = "1jp8fvw6f9jh0sdjml9mahkk6p6b96p6rzg2y601mnnbcdj8y8xp";
})
];

cmakeFlags = ''
-DSYSTEMD_SUPPORT=ON
Expand All @@ -40,4 +47,4 @@ stdenv.mkDerivation {
maintainers = [ maintainers.ehmry ];
platforms = platforms.unix;
};
}
}
24 changes: 10 additions & 14 deletions pkgs/servers/uhub/plugin-dir.patch
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 40e996e..d3b7e6d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -185,10 +185,16 @@ else()
# add_definitions(-DDEBUG)
endif()
@@ -241,8 +241,14 @@

+set( PLUGINS mod_example mod_welcome mod_logging mod_auth_simple mod_auth_sqlite mod_chat_history mod_chat_only mod_topic mod_no_guest_downloads )
+
if (UNIX)
install( TARGETS uhub RUNTIME DESTINATION bin )
- install( TARGETS mod_example mod_welcome mod_logging mod_auth_simple mod_auth_sqlite mod_chat_history mod_chat_only mod_topic mod_no_guest_downloads DESTINATION /usr/lib/uhub/ OPTIONAL )
install( TARGETS uhub uhub-passwd RUNTIME DESTINATION bin )
- install( TARGETS mod_example mod_welcome mod_logging mod_auth_simple mod_auth_sqlite mod_chat_history mod_chat_history_sqlite mod_chat_only mod_topic mod_no_guest_downloads DESTINATION /usr/lib/uhub/ OPTIONAL )
- install( FILES ${CMAKE_SOURCE_DIR}/doc/uhub.conf ${CMAKE_SOURCE_DIR}/doc/plugins.conf ${CMAKE_SOURCE_DIR}/doc/rules.txt ${CMAKE_SOURCE_DIR}/doc/motd.txt DESTINATION /etc/uhub OPTIONAL )
+
+ foreach( PLUGIN ${PLUGINS} )
+ install( TARGETS ${PLUGIN} DESTINATION $ENV{${PLUGIN}} OPTIONAL )
+ endforeach( PLUGIN )
+ set( PLUGINS mod_example mod_welcome mod_logging mod_auth_simple mod_chat_history mod_chat_only mod_topic mod_no_guest_downloads )
+
+ foreach( PLUGIN ${PLUGINS} )
+ install( TARGETS ${PLUGIN} DESTINATION $ENV{${PLUGIN}} OPTIONAL )
+ endforeach( PLUGIN )
+
+ install( FILES ${CMAKE_SOURCE_DIR}/doc/uhub.conf ${CMAKE_SOURCE_DIR}/doc/plugins.conf ${CMAKE_SOURCE_DIR}/doc/rules.txt ${CMAKE_SOURCE_DIR}/doc/motd.txt DESTINATION doc/ OPTIONAL )
endif()


if (SQLITE_SUPPORT)
install( TARGETS uhub-passwd RUNTIME DESTINATION bin )
164 changes: 0 additions & 164 deletions pkgs/servers/uhub/systemd.patch

This file was deleted.

0 comments on commit 39e197a

Please sign in to comment.