Files
profiled/CMakeLists.txt
oxmc a86ad3298e Rename project from vesperprofiled to pawletprofiled (PawletOS fork)
This checkout is PawletOS's fork (git.oxmc.me/PawletOS/profiled), so its
own identity should read PawletOS, not VesperOS: binary/package name,
AIDL package+interface (me.oxmc.vesperos.profile -> os.pawlet.profiled),
D-Bus service/object/error names, C++ namespace (vesperos::profile ->
pawletos::profile), sepolicy types, data paths (/data/system/vesperos ->
/data/system/pawletos, /etc/vesperprofiled -> /etc/pawletprofiled), the
vendored OpenSSL static-lib module names, and the ZTE protocol string.

Also drops generated build output (obj-x86_64-linux-gnu/, debian/.debhelper,
debian staging dir, debhelper log/substvars files) that had been committed
by mistake, and adds a .gitignore so they don't come back.

The stock/upstream vesperprofiled at git.oxmc.me/VesperOS/vesperprofiled
is untouched -- this commit only goes to the pawletos remote.
2026-07-25 00:50:46 -07:00

105 lines
3.4 KiB
CMake

cmake_minimum_required(VERSION 3.18)
project(pawletprofiled VERSION 1.0.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "-g -fsanitize=address")
# ── Dependencies ───────────────────────────────────────────────────────────
find_package(PkgConfig REQUIRED)
find_package(CURL REQUIRED)
pkg_check_modules(OPENSSL REQUIRED openssl)
pkg_check_modules(LIBYAML REQUIRED yaml-0.1)
pkg_check_modules(DBUS REQUIRED dbus-1)
pkg_check_modules(SYSTEMD REQUIRED libsystemd)
# ── Sources ────────────────────────────────────────────────────────────────
set(SOURCES
src/main.cpp
src/PawletProfileService.cpp
src/ProfileParser.cpp
src/ProfileStore.cpp
src/SignatureVerifier.cpp
src/payloads/PayloadHandlers.cpp # shared dispatch — see its header comment
src/platform/linux/Wifi.cpp
src/platform/linux/Ethernet.cpp
src/platform/linux/Vpn.cpp
src/platform/linux/Cert.cpp
src/platform/linux/Pkcs12.cpp
src/platform/linux/Passcode.cpp
src/platform/linux/Mdm.cpp
src/platform/linux/SoftwareUpdate.cpp
src/platform/linux/TimeServer.cpp
src/platform/linux/Proxy.cpp
src/platform/linux/DnsProxy.cpp
src/platform/linux/Firewall.cpp
src/platform/linux/Ldap.cpp
src/platform/linux/Wallpaper.cpp
src/platform/linux/Screensaver.cpp
src/platform/linux/FirstBoot.cpp
src/platform/linux/ContentCache.cpp
src/zte/DeviceIdentity.cpp
src/zte/ZTELookupClient.cpp
src/zte/ConnectivityWatcher.cpp
)
add_executable(pawletprofiled ${SOURCES})
target_include_directories(pawletprofiled PRIVATE
src/
${OPENSSL_INCLUDE_DIRS}
${LIBYAML_INCLUDE_DIRS}
${DBUS_INCLUDE_DIRS}
${SYSTEMD_INCLUDE_DIRS}
${CURL_INCLUDE_DIRS}
)
target_link_libraries(pawletprofiled PRIVATE
${OPENSSL_LIBRARIES}
${LIBYAML_LIBRARIES}
${DBUS_LIBRARIES}
${SYSTEMD_LIBRARIES}
${CURL_LIBRARIES}
pthread
)
target_compile_options(pawletprofiled PRIVATE
-Wall -Wextra -Werror
${OPENSSL_CFLAGS_OTHER}
${LIBYAML_CFLAGS_OTHER}
${DBUS_CFLAGS_OTHER}
${SYSTEMD_CFLAGS_OTHER}
${CURL_CFLAGS_OTHER}
)
# ── Install ────────────────────────────────────────────────────────────────
include(GNUInstallDirs)
install(TARGETS pawletprofiled
RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR}
)
install(FILES systemd/pawletprofiled.service
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/systemd/system
)
install(FILES dbus/os.pawlet.ProfiledService.conf
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d
)
install(FILES apparmor/pawletprofiled
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/apparmor.d
)
install(FILES zte.conf.example
DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/pawletprofiled
RENAME zte.conf.example
)
# Note: profile.schema.yml is NOT installed here — it is owned by the
# pawletprofiled-config-schema package and installed at
# /usr/share/pawletprofiled/schema/profile.schema.yml