Skip to content

Commit

Permalink
openldap: clean up package_folder
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 1, 2023
1 parent f9ae82f commit ff1a39d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions recipes/openldap/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rm, rmdir
from conan.tools.files import apply_conandata_patches, chdir, copy, export_conandata_patches, get, rm, rmdir, move_folder_contents
from conan.tools.gnu import Autotools, AutotoolsDeps, AutotoolsToolchain
from conan.tools.layout import basic_layout

Expand Down Expand Up @@ -88,8 +88,16 @@ def package(self):
autotools.install()
copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, "COPYRIGHT", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
for folder in ["var", "share", "etc", "lib/pkgconfig", "res"]:
rmdir(self, os.path.join(self.package_folder, folder))
if os.path.exists(os.path.join(self.source_folder, "libexec")):
move_folder_contents(self, os.path.join(self.source_folder, "libexec"),
os.path.join(self.package_folder, "bin"))
# Remove symlinks to libexec/slapd
for path in self.package_path.joinpath("bin").glob("slap*"):
if path.is_symlink():
path.unlink()
for folder in ["var", "share", "etc", "lib/pkgconfig", "res", "home", "libexec"]:
if os.path.exists(os.path.join(self.package_folder, folder)):
rmdir(self, os.path.join(self.package_folder, folder))
rm(self, "*.la", self.package_folder, recursive=True)

def package_info(self):
Expand Down

0 comments on commit ff1a39d

Please sign in to comment.