2 ###############################################################################
4 # Pakfire - The IPFire package management system #
5 # Copyright (C) 2011 Pakfire development team #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
26 from __version__
import PAKFIRE_VERSION
28 PAKFIRE_LEAST_COMPATIBLE_VERSION
= PAKFIRE_VERSION
31 SCRIPT_DIR
= "/usr/lib/pakfire"
33 CONFIG_DIR
= os
.path
.join(SYSCONFDIR
, "pakfire.repos.d")
34 CONFIG_DIR_EXT
= ".repo"
35 CONFIG_FILE
= os
.path
.join(SYSCONFDIR
, "pakfire.conf")
37 CACHE_DIR
= "/var/cache/pakfire"
38 CCACHE_CACHE_DIR
= os
.path
.join(CACHE_DIR
, "ccache")
39 CACHE_ENVIRON_DIR
= os
.path
.join(CACHE_DIR
, "environments")
40 REPO_CACHE_DIR
= os
.path
.join(CACHE_DIR
, "repos")
42 LOCAL_BUILD_REPO_PATH
= "/var/lib/pakfire/local"
43 LOCAL_TMP_PATH
= "/var/tmp"
45 PACKAGES_DB_DIR
= "var/lib/pakfire"
46 PACKAGES_DB
= os
.path
.join(PACKAGES_DB_DIR
, "packages.db")
47 PACKAGES_SOLV
= os
.path
.join(PACKAGES_DB_DIR
, "packages.solv")
48 REPOSITORY_DB
= "index.db"
52 MIRRORLIST_MAXSIZE
= 1024**2
54 MACRO_FILE_DIR
= "/usr/lib/pakfire/macros"
55 MACRO_EXTENSION
= ".macro"
58 METADATA_DOWNLOAD_LIMIT
= 1024**2
59 METADATA_DOWNLOAD_PATH
= "repodata"
60 METADATA_DOWNLOAD_FILE
= "repomd.json"
61 METADATA_DATABASE_FILE
= "packages.solv"
64 # XXX implement this properly
65 PACKAGE_FORMATS_SUPPORTED
= [0, 1, 2, 3]
66 PACKAGE_EXTENSION
= "pfm"
67 MAKEFILE_EXTENSION
= "nm"
70 DATABASE_FORMATS_SUPPORTED
= [0, 1, 2, 3]
72 PACKAGE_FILENAME_FMT
= "%(name)s-%(version)s-%(release)s.%(arch)s.%(ext)s"
76 "pakfire-build>=%s" % PAKFIRE_LEAST_COMPATIBLE_VERSION
,
79 # A script that is called, when a user is dropped to a chroot shell.
80 SHELL_SCRIPT
= "/usr/lib/pakfire/chroot-shell"
81 SHELL_PACKAGES
= ["elinks", "less", "vim", SHELL_SCRIPT
,]
82 BUILD_ROOT
= "/var/lib/pakfire/build"
84 SOURCE_DOWNLOAD_URL
= "http://source.ipfire.org/source-3.x/"
85 SOURCE_CACHE_DIR
= os
.path
.join(CACHE_DIR
, "sources")
90 ORPHAN_DIRECTORIES
= [
91 "lib", "lib64", "usr/lib", "usr/lib64", "libexec", "usr/libexec",
92 "bin", "sbin", "usr/bin", "usr/sbin", "usr/include", "usr/share",
93 "usr/share/man", "usr/share/man/man0", "usr/share/man/man1",
94 "usr/share/man/man2", "usr/share/man/man3", "usr/share/man/man4",
95 "usr/share/man/man5", "usr/share/man/man6", "usr/share/man/man7",
96 "usr/share/man/man8", "usr/share/man/man9", "usr/lib/pkgconfig",
98 for i
in ORPHAN_DIRECTORIES
:
99 i
= os
.path
.dirname(i
)
101 if not i
or i
in ORPHAN_DIRECTORIES
:
104 ORPHAN_DIRECTORIES
.append(i
)
106 ORPHAN_DIRECTORIES
.sort(cmp=lambda x
,y
: cmp(len(x
), len(y
)), reverse
=True)
109 # Pakfire %(pakfire_version)s
111 # Package information
114 version = %(version)s
115 release = %(release)s
121 maintainer = %(maintainer)s
123 license = %(license)s
125 summary = %(summary)s
137 host = %(build_host)s
139 time = %(build_time)d
142 # Distribution information
144 name = %(distro_name)s
145 release = %(distro_release)s
146 vendor = %(distro_vendor)s
147 maintainer = %(distro_maintainer)s
150 # Dependency information
175 PACKAGE_INFO_DESCRIPTION_LINE
= PACKAGE_INFO_DEPENDENCY_LINE
= "\t\t%s"
177 # XXX make this configurable in pakfire.conf
178 PAKFIRE_MULTIINSTALL
= ["kernel", "kernel-PAE",]
180 SCRIPTLET_INTERPRETER
= "/bin/sh"
181 SCRIPTLET_TIMEOUT
= 60 * 15
195 LDCONFIG
= "/sbin/ldconfig"
197 CONFIG_FILE_SUFFIX_NEW
= ".paknew"
198 CONFIG_FILE_SUFFIX_SAVE
= ".paksave"