diff --git a/CMakeLists.txt b/CMakeLists.txt index f78ca60..b015082 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,4 +29,14 @@ set_target_properties(info PROPERTIES PREFIX "" SUFFIX ".so" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/modules" -) \ No newline at end of file +) + +# Installation rules +install(TARGETS dpm DESTINATION bin) +install(DIRECTORY DESTINATION /etc/dpm/conf.d) +install(FILES ${CMAKE_SOURCE_DIR}/data/modules.conf DESTINATION /etc/dpm/conf.d) + +# Install all .so files from build/modules to the module path +install(DIRECTORY ${CMAKE_BINARY_DIR}/modules/ + DESTINATION /usr/lib/dpm/modules + FILES_MATCHING PATTERN "*.so") \ No newline at end of file diff --git a/README.md b/README.md index 267d1a1..f2e22b5 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,45 @@ The core component of the Dark Horse Linux Package Manager -# What is DPM? +## What is DPM? https://dpm.darkhorselinux.org +## Build Dependencies +To build DPM from source, you'll need the following dependencies: + +- GCC/G++ (version 10 or later, supporting C++20) +- CMake (version 3.22 or later) +- Make +- libstdc++ (C++ standard library) +- Linux headers +- dlopen/dlsym support (provided by libdl) + +## Building from Source + +``` +mkdir ./build && cd ./build +cmake ../ +make +make install +``` + +This will install: +- The `dpm` binary to `/usr/bin/` +- Module shared objects to `/usr/lib/dpm/modules/` +- Configuration files to `/etc/dpm/conf.d/` + +## Development + +For development work, you can run DPM directly from the build directory: + +``` +./dpm +``` + +To load modules from the build directory, specify the module path: + +``` +./dpm -m ./modules +``` \ No newline at end of file