Description: Use cmake as build system
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Bug-Debian:
    https://bugs.debian.org/777290
    https://bugs.debian.org/912120
Last-Update: 2018-11-25

--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 3.7)
+project(biff)
+
+set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin")
+set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin")
+set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
+
+add_subdirectory(biff)
+add_subdirectory(comsat)
--- /dev/null
+++ b/biff/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+add_executable(
+    biff
+    biff.c
+)
+install(
+    TARGETS biff
+    DESTINATION ${BIN_DIR}
+)
+
+install(
+    FILES biff.1
+    DESTINATION ${MAN_DIR}/man1/
+)
--- /dev/null
+++ b/comsat/CMakeLists.txt
@@ -0,0 +1,20 @@
+
+add_executable(
+    in.comsat
+    comsat.c
+)
+install(
+    TARGETS in.comsat
+    DESTINATION ${SBIN_DIR}
+)
+
+install(
+    FILES comsat.8
+    DESTINATION ${MAN_DIR}/man8/
+)
+INSTALL(
+    CODE "execute_process( \
+        COMMAND ${CMAKE_COMMAND} -E create_symlink \
+        comsat.8 \$ENV{DESTDIR}${MAN_DIR}/man8/in.comsat.8 \
+    )"
+)
