Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mlcoch <tmlcoch@redhat.com>2014-04-07 15:42:10 +0400
committerTomas Mlcoch <tmlcoch@redhat.com>2014-04-07 15:42:10 +0400
commit2ece2d3e1a0f0b3164f5149e8204bf80cadb3d5d (patch)
tree85bab1007810ee0cab43dbc1084e7ac398d31463
parent4689d199435652764fd1c54234ba69629c2ee3e1 (diff)
CMake: Support for build with custom RPM version (CMake now supports RPM_PATH)
-rw-r--r--CMakeLists.txt36
-rw-r--r--README.md14
2 files changed, 36 insertions, 14 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a6bb141..e2f1162 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,25 +41,33 @@ include_directories(${GLIB2_INCLUDE_DIRS})
include_directories(${LIBXML2_INCLUDE_DIR})
-# rpm:
-
-FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
-IF (NOT RPMDB_LIBRARY)
- FIND_LIBRARY (RPMDB_LIBRARY NAMES rpm)
+IF (RPM_PATH)
+ SET (RPM_PATH "/home/tmlcoch/git/rpm")
+ include_directories("${RPM_PATH}/include/")
+ SET(RPMDB_LIBRARY "${RPM_PATH}/rpmio/.libs/librpmio.so"
+ "${RPM_PATH}/lib/.libs/librpm.so")
+ message("Using custom RPM: ${RPMDB_LIBRARY}")
+ELSE (RPM_PATH)
+ # rpm:
+ FIND_LIBRARY (RPMDB_LIBRARY NAMES rpmdb)
IF (NOT RPMDB_LIBRARY)
- MESSAGE(FATAL_ERROR "No Rpm library installed")
+ FIND_LIBRARY (RPMDB_LIBRARY NAMES rpm)
+ IF (NOT RPMDB_LIBRARY)
+ MESSAGE(FATAL_ERROR "No Rpm library installed")
+ ENDIF (NOT RPMDB_LIBRARY)
ENDIF (NOT RPMDB_LIBRARY)
-ENDIF (NOT RPMDB_LIBRARY)
-# rpmio:
+ # rpmio:
+ FIND_LIBRARY (RPMIO_LIBRARY NAMES rpmio)
+ IF (RPMIO_LIBRARY)
+ SET(RPMDB_LIBRARY ${RPMIO_LIBRARY} ${RPMDB_LIBRARY})
+ ELSE (RPMIO_LIBRARY)
+ MESSAGE(FATAL_ERROR "No Rpmio library installed")
+ ENDIF (RPMIO_LIBRARY)
-FIND_LIBRARY (RPMIO_LIBRARY NAMES rpmio)
-IF (RPMIO_LIBRARY)
- SET(RPMDB_LIBRARY ${RPMIO_LIBRARY} ${RPMDB_LIBRARY})
-ELSE (RPMIO_LIBRARY)
- MESSAGE(FATAL_ERROR "No Rpmio library installed")
-ENDIF (RPMIO_LIBRARY)
+ message("Using system RPM: ${RPMDB_LIBRARY}")
+ENDIF (RPM_PATH)
# Get package version
diff --git a/README.md b/README.md
index 58e23a5..0a018a9 100644
--- a/README.md
+++ b/README.md
@@ -43,6 +43,20 @@ To build the documentation, from the build/ directory:
cmake -DCMAKE_BUILD_TYPE:STRING=DEBUG .. && make
+## Building from an rpm checkout
+
+E.g. when you want to try weak and rich dependencies.
+
+ cmake -D RPM_PATH="/home/tmlcoch/git/rpm" .. && make
+
+**Note:** The RPM must be buit in that directory
+
+Commands I am using for building of RPM:
+
+ cd /home/tmlcoch/git/rpm
+ CPPFLAGS='-I/usr/include/nss3/ -I/usr/include/nspr4/' ./autogen.sh --rpmconfigure --with-vendor=redhat --with-external-db --with-lua --with-selinux --with-cap --with-acl --enable-python
+ make clean && make
+
## Build tarball
utils/make_tarball.sh [git revision]