Skip to content

Commit 38c088a

Browse files
committed
Add a package/repo parser for apk
You need to configure with ENABLE_APK to get them. Note that we currently only support the v2 format. We'll add v3 support if somebody uses it in the future.
1 parent fbbf256 commit 38c088a

File tree

9 files changed

+545
-18
lines changed

9 files changed

+545
-18
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ OPTION (ENABLE_RPMMD "Build with rpmmd repository support?" OFF)
2424
OPTION (ENABLE_SUSEREPO "Build with suse repository support?" OFF)
2525
OPTION (ENABLE_COMPS "Build with fedora comps support?" OFF)
2626
OPTION (ENABLE_HELIXREPO "Build with helix repository support?" OFF)
27-
OPTION (ENABLE_DEBIAN "Build with debian database/repository support?" OFF)
27+
OPTION (ENABLE_DEBIAN "Build with debian package/repository support?" OFF)
2828
OPTION (ENABLE_MDKREPO "Build with mandriva/mageia repository support?" OFF)
2929
OPTION (ENABLE_ARCHREPO "Build with archlinux repository support?" OFF)
30+
OPTION (ENABLE_APK "Build with apk package/repository support?" OFF)
3031
OPTION (ENABLE_CUDFREPO "Build with cudf repository support?" OFF)
3132
OPTION (ENABLE_HAIKU "Build with Haiku package support?" OFF)
3233
OPTION (ENABLE_CONDA "Build with conda dependency support?" OFF)
@@ -314,6 +315,7 @@ FOREACH (VAR
314315
ENABLE_HELIXREPO ENABLE_MDKREPO ENABLE_ARCHREPO ENABLE_DEBIAN ENABLE_HAIKU
315316
ENABLE_ZLIB_COMPRESSION ENABLE_LZMA_COMPRESSION ENABLE_BZIP2_COMPRESSION
316317
ENABLE_ZSTD_COMPRESSION ENABLE_ZCHUNK_COMPRESSION ENABLE_PGPVRFY ENABLE_APPDATA
318+
ENABLE_APK
317319
WITH_SYSTEM_ZCHUNK)
318320
IF(${VAR})
319321
ADD_DEFINITIONS (-D${VAR}=1)

README

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Supported package formats:
2424
- deb
2525
- arch linux
2626
- haiku
27+
- apk
2728

2829
Supported repository formats:
2930

@@ -33,6 +34,7 @@ Supported repository formats:
3334
- arch linux
3435
- red carpet helix format
3536
- haiku
37+
- apk
3638

3739
Build instructions
3840
==================

ext/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ IF (ENABLE_DEBIAN)
7474
repo_deb.h)
7575
ENDIF (ENABLE_DEBIAN)
7676

77+
IF (ENABLE_APK)
78+
SET (libsolvext_SRCS ${libsolvext_SRCS}
79+
repo_apk.c)
80+
SET (libsolvext_HEADERS ${libsolvext_HEADERS}
81+
repo_apk.h)
82+
ENDIF (ENABLE_APK)
83+
7784
IF (ENABLE_HELIXREPO)
7885
SET (libsolvext_SRCS ${libsolvext_SRCS}
7986
repo_helix.c)
@@ -144,10 +151,10 @@ IF (ENABLE_ZCHUNK_COMPRESSION)
144151
solv_zchunk.c)
145152
ENDIF (ENABLE_ZCHUNK_COMPRESSION)
146153

147-
IF (ENABLE_ARCHREPO)
154+
IF (ENABLE_ARCHREPO OR ENABLE_APK)
148155
SET (libsolvext_SRCS ${libsolvext_SRCS}
149156
tarhead.c)
150-
ENDIF (ENABLE_ARCHREPO)
157+
ENDIF (ENABLE_ARCHREPO OR ENABLE_APK)
151158

152159
IF (NOT MSVC)
153160
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")

ext/libsolvext.ver

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ SOLV_1.0 {
33
pool_deb_get_autoinstalled;
44
pool_findfileconflicts;
55
pool_parserpmrichdep;
6+
repo_add_apk_pkg;
7+
repo_add_apk_repo;
68
repo_add_appdata;
79
repo_add_appdata_dir;
810
repo_add_arch_local;

0 commit comments

Comments
 (0)