Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git a/CMakeLists.txt b/CMakeLists.txt 2index a9daee7..7c6da08 100755 3--- a/CMakeLists.txt 4+++ b/CMakeLists.txt 5@@ -17,7 +17,6 @@ 6 # CMakeLists.txt -- template and derived ESC/I ESC/I-2 protocol commands 7 8 project (epsonscan2) 9-set (CMAKE_INSTALL_PREFIX "/usr") 10 cmake_minimum_required (VERSION 2.8.12.2) 11 12 include(GNUInstallDirs) 13@@ -86,7 +85,6 @@ set(COMMON_ETC_PATH ${CMAKE_INSTALL_FULL_SYSCONFDIR}) 14 set(EPSON_WORK_PATH /tmp/epsonWork/) 15 set(EPSON_SETTINGS_PATH $ENV{HOME}/.epsonscan2/) 16 17-SET (CMAKE_INSTALL_PREFIX /usr) 18 set(EPSON_INSTALL_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/epsonscan2/) 19 set(COMMON_SHARE_PATH ${CMAKE_INSTALL_FULL_DATAROOTDIR}) 20 21@@ -113,8 +111,8 @@ add_subdirectory(src) 22 23 install(DIRECTORY Resources DESTINATION ${EPSON_INSTALL_ROOT}${EPSON_INSTALL_PATH}) 24 25-install(FILES epsonscan2.rules DESTINATION ${EPSON_INSTALL_ROOT}/lib/udev/rules.d/ RENAME 60-epsonscan2.rules) 26-install(FILES epsonscan2 DESTINATION ${EPSON_INSTALL_ROOT}/etc/sane.d/dll.d) 27+install(FILES epsonscan2.rules DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d/ RENAME 60-epsonscan2.rules) 28+install(FILES epsonscan2 DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/etc/sane.d/dll.d) 29 install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/)") 30 install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1)") 31 install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1.0.0)") 32diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt 33index c884d83..5ddff0c 100644 34--- a/src/CMakeLists.txt 35+++ b/src/CMakeLists.txt 36@@ -26,7 +26,9 @@ add_subdirectory(ES2Command/Linux) 37 add_subdirectory(ES2FileFormat/Linux) 38 add_subdirectory(Controller) 39 add_subdirectory(SaneWrapper/Linux) 40+if (NOT DEFINED NO_GUI) 41 add_subdirectory(Standalone) 42 add_subdirectory(DetectAlert) 43+endif () 44 add_subdirectory(ScanSDK) 45 46diff --git a/src/Controller/Src/Filter/GetOrientation.cpp b/src/Controller/Src/Filter/GetOrientation.cpp 47index 387561e..15448ad 100644 48--- a/src/Controller/Src/Filter/GetOrientation.cpp 49+++ b/src/Controller/Src/Filter/GetOrientation.cpp 50@@ -12,14 +12,7 @@ namespace epsonscan 51 52 static std::string GetExecPath() 53 { 54-#ifdef AKBMODE 55- std::string strDst = "/usr/libexec/"; 56- strDst = strDst + DRIVER_NAME; 57- strDst = strDst + "-ocr/ocr-engine-getrotate"; 58- return strDst.c_str() ; 59-#else 60- return "/usr/libexec/epsonscan2-ocr/ocr-engine-getrotate" ; 61-#endif 62+ return "@OCR_ENGINE_GETROTATE@"; 63 } 64 static const int kMaxBuf = 256; 65 66diff --git a/src/Controller/Src/Scanner/Engine.cpp b/src/Controller/Src/Scanner/Engine.cpp 67index 8bd842e..d011329 100755 68--- a/src/Controller/Src/Scanner/Engine.cpp 69+++ b/src/Controller/Src/Scanner/Engine.cpp 70@@ -210,8 +210,8 @@ bool Engine::InitWithDeviceInfoDict(const char *deviceInfo) { 71 SDIError Engine::Open() 72 { 73 SDI_TRACE_LOG("Enter"); 74- system("killall -9 -q es2netif > /dev/null"); 75- system("killall -9 -q es2intif > /dev/null"); 76+ system("@KILLALL@ -9 -q es2netif > /dev/null"); 77+ system("@KILLALL@ -9 -q es2intif > /dev/null"); 78 if (engine_) { 79 return ExchangeError(engine_->Open()); 80 } 81diff --git a/src/Standalone/CMakeLists.txt b/src/Standalone/CMakeLists.txt 82index eff3dd3..c2b3803 100644 83--- a/src/Standalone/CMakeLists.txt 84+++ b/src/Standalone/CMakeLists.txt 85@@ -167,5 +167,5 @@ target_link_libraries(es2standalone ${QT_LIBRARIES} 86 ) 87 88 QT5_USE_MODULES(es2standalone Widgets) 89-install(TARGETS es2standalone DESTINATION "${EPSON_INSTALL_ROOT}/usr/bin") 90+install(TARGETS es2standalone DESTINATION "${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_BINDIR}") 91