]> git.saurik.com Git - apt.git/blame - vendor/CMakeLists.txt
Japanese manpages translation update
[apt.git] / vendor / CMakeLists.txt
CommitLineData
f3de2dba 1# Determine the current vendor, export to CURRENT_VENDOR
0fead284
JAK
2if (NOT DEFINED CURRENT_VENDOR)
3 execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/getinfo current
4 OUTPUT_VARIABLE CURRENT_VENDOR_OUT OUTPUT_STRIP_TRAILING_WHITESPACE)
f3de2dba 5
0fead284
JAK
6 set(CURRENT_VENDOR "${CURRENT_VENDOR_OUT}" CACHE STRING "Select the system vendor")
7 message(STATUS "Detected vendor: ${CURRENT_VENDOR_OUT}")
8else()
9 message(STATUS "Detected vendor: ${CURRENT_VENDOR} (cached)")
10endif()
f3de2dba
JAK
11
12# Handle sources.list example
13add_vendor_file(OUTPUT sources.list
14 INPUT "${CURRENT_VENDOR}/sources.list.in"
15 MODE 644
16 VARIABLES sourceslist-list-format
17 debian-stable-codename
18 debian-oldstable-codename
19 debian-testing-codename
20 ubuntu-codename
21 current-codename)
22install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sources.list
23 DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
24
25# Handle apt.conf snippets
26file(GLOB conffiles ${CURRENT_VENDOR}/apt.conf-*)
27foreach(file ${conffiles})
28 file(RELATIVE_PATH confname ${CMAKE_CURRENT_SOURCE_DIR}/${CURRENT_VENDOR}/ ${file})
29 string(REPLACE "apt.conf-" "" confname "${confname}")
30 install(FILES "${file}"
31 DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/apt/apt.conf.d/"
32 RENAME "${confname}")
33endforeach()
34
35if (EXISTS "${CURRENT_VENDOR}/CMakeLists.txt")
36 add_subdirectory(${CURRENT_VENDOR})
37endif()