-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for reading module metadata
Signed-off-by: Stephen Gallagher <[email protected]>
- Loading branch information
1 parent
be7a294
commit 19699d1
Showing
19 changed files
with
349 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Try to find libmodulemd 2.3+ | ||
# | ||
# LIBMODULEMD_FOUND - system has libmodulemd | ||
# LIBMODULEMD_INCLUDE_DIRS - the libmodulemd include directory | ||
# LIBMODULEMD_LIBRARIES - Link these to use libmodulemd | ||
# | ||
# Copyright (c) 2019 Stephen Gallagher <[email protected]> | ||
|
||
# Redistribution and use is allowed according to the terms of the New | ||
# BSD license. | ||
|
||
IF ( LIBMODULEMD_LIBRARIES AND LIBMODULEMD_INCLUDE_DIRS ) | ||
# in cache already | ||
SET(LIBMODULEMD_FOUND TRUE) | ||
ELSE ( LIBMODULEMD_LIBRARIES AND LIBMODULEMD_INCLUDE_DIRS ) | ||
|
||
INCLUDE(FindPkgConfig) | ||
|
||
IF ( LIBMODULEMD_FIND_REQUIRED ) | ||
SET ( _pkgconfig_REQUIRED "REQUIRED" ) | ||
ELSE ( LIBMODULEMD_FIND_REQUIRED ) | ||
SET ( _pkgconfig_REQUIRED "" ) | ||
endif ( LIBMODULEMD_FIND_REQUIRED ) | ||
|
||
PKG_SEARCH_MODULE ( LIBMODULEMD ${_pkgconfig_REQUIRED} modulemd-2.0>=2.3 ) | ||
|
||
IF (LIBMODULEMD_FOUND) | ||
IF (NOT LIBMODULEMD_FIND_QUIETLY) | ||
MESSAGE (STATUS "Found libmodulemd: ${LIBMODULEMD_LIBRARIES} ${LIBMODULEMD_INCLUDE_DIRS}") | ||
ENDIF (NOT LIBMODULEMD_FIND_QUIETLY) | ||
ELSE (LIBMODULEMD_FOUND) | ||
IF (LIBMODULEMD_FIND_REQUIRED) | ||
MESSAGE (SEND_ERROR "Could not find libmodulemd") | ||
ENDIF (LIBMODULEMD_FIND_REQUIRED) | ||
ENDIF (LIBMODULEMD_FOUND) | ||
|
||
# show the LIBMODULEMD_INCLUDE_DIRS and LIBMODULEMD_LIBRARIES variables only in the advanced view | ||
MARK_AS_ADVANCED(LIBMODULEMD_INCLUDE_DIRS LIBMODULEMD_LIBRARIES) | ||
|
||
ENDIF ( LIBMODULEMD_LIBRARIES AND LIBMODULEMD_INCLUDE_DIRS ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* createrepo_c - Library of routines for manipulation with repodata | ||
* Copyright (C) 2013 Tomas Mlcoch | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | ||
* USA. | ||
*/ | ||
|
||
#ifndef __C_CREATEREPOLIB_METADATA_INTERNAL_H__ | ||
#define __C_CREATEREPOLIB_METADATA_INTERNAL_H__ | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifdef WITH_LIBMODULEMD | ||
#include <modulemd.h> | ||
#include "load_metadata.h" | ||
|
||
/** Return module metadata from a cr_Metadata | ||
* @param md cr_Metadata object. | ||
* @return Pointer to internal ModulemdModuleIndex. | ||
*/ | ||
ModulemdModuleIndex *cr_metadata_modulemd(cr_Metadata *md); | ||
|
||
#endif /* WITH_LIBMODULEMD */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* __C_CREATEREPOLIB_METADATA_INTERNAL_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.