Commit 51b54c04 authored by Ophélie Gagnard's avatar Ophélie Gagnard

Rename static-light-build-dependencies-mca to dep_mca-static :

- templates/compilation-templates/dep_mca-static/:
    - Copy from light-build-dependencies-mca/ (which will be moved to dep_mca in the near future).
    - Makefile.in: Don't copy the dynamic libraries.

- distribution-specifics/dep_mca-static/: Rename accordingly.
parent ab6a84d7
static-light-build-dependencies-mca (1-1) UNRELEASED; urgency=medium
dep_mca-static (1-1) UNRELEASED; urgency=medium
* Initial release. (Closes: #XXXXXX)
......
Source: static-light-build-dependencies-mca
Source: dep_mca-static
Maintainer: Francois Gagnard <francois.gagnard@nexedi.com>
Section: net
Priority: optional
......@@ -11,7 +11,7 @@ Build-Depends: debhelper (>= 4.1.16),
golang (>= 2:1.15~1),
cmake (>= 3.18)
Package: static-light-build-dependencies-mca
Package: dep_mca-static
Architecture: any
Depends: ${misc:Depends},
${shlibs:Depends},
......@@ -26,4 +26,4 @@ Depends: ${misc:Depends},
# devperm manager plugin wants to use lsblk
util-linux
Conflicts:
Description: static-light-build-dependencies-mca packaging test
Description: dep_mca-static packaging test
/opt/dep_mca-static_1-1/bin/
/opt/dep_mca-static_1-1/etc/
/opt/dep_mca-static_1-1/lib/
/opt/dep_mca-static_1-1/share/
Format: 3.0 (native)
Source: static-light-build-dependencies-mca
Source: dep_mca-static
Architecture: any
Version: 1
Build-Depends: debhelper (>= 4.1.16),
......
/opt/static-light-build-dependencies-mca_1-1/bin/
/opt/static-light-build-dependencies-mca_1-1/include/
/opt/static-light-build-dependencies-mca_1-1/etc/
/opt/static-light-build-dependencies-mca_1-1/lib/
/opt/static-light-build-dependencies-mca_1-1/share/
PY = $(PYTHON)
#INSTALL_DIR = $(DESTDIR)/opt/test
#TARGET_DIR = /opt/slapos
# This templates are replaced by build-scripts/template_stage.sh
# according to the values and regular expressions defined in
# build-scripts/configuration_information.sh
# The variable TARGET_DIR is pretty useless atm
TARGET_DIR = %TARGET_DIR%
TARBALL_DIR = $(shell pwd)
BUILD_DIR = $(TARBALL_DIR)/build
INSTALL_DIR = $(DESTDIR)$(TARGET_DIR)
RUN_BUILDOUT_DIR = $(BUILD_DIR)$(TARGET_DIR)
#PATCHES_DIR := $(shell pwd)/patches
# get the path of the BUILD_DIR of the first build (performed to prepare the cache for OBS)
OLD_TARBALL_DIR := $(shell cat local_build_directory)
#Use to get path of buildout correct
#ORIGINAL_DIRECTORY := $(shell cat ./original_directory)
all: build
build: build-stamp
build-stamp:
@echo "Fixing buildout path to $(TARBALL_DIR) rather than $(OLD_TARBALL_DIR) for buildout"
################################################################################
# grep -rIl '$(OLD_DIRECTORY)' $(BUILD_DIR) 2> /dev/null | \
# xargs sed -i 's#$(OLD_DIRECTORY)#$(BUILD_DIR)#g' || \
# echo "No path to fix."
################################################################################
ls -l $(RUN_BUILDOUT_DIR) # DEBUG
ls -l $(RUN_BUILDOUT_DIR)/bin/ # DEBUG
cd $(RUN_BUILDOUT_DIR); sed -i 's#$(OLD_TARBALL_DIR)#$(TARBALL_DIR)#g' buildout.cfg bin/*
echo RUN_BUILDOUT_DIR = $(RUN_BUILDOUT_DIR) \; PY = $(PY)
cd $(RUN_BUILDOUT_DIR) && \
$(PY) ./bin/buildout -v
@touch build-stamp
clean:
# TODO: implement a proper cleaning
#rm -rf $(BUILD_DIR)
rm -f *-stamp
install: all
# mkdir
mkdir -p $(INSTALL_DIR)/bin
mkdir -p $(INSTALL_DIR)/etc/
#mkdir -p $(INSTALL_DIR)/include/
mkdir -p $(INSTALL_DIR)/lib/
mkdir -p $(INSTALL_DIR)/share/
# cp
#cp `find $(RUN_BUILDOUT_DIR) | grep -e "^$(RUN_BUILDOUT_DIR)/[^/][^/]*/bin/*` $(DESTDIR)/usr/bin/
# bin
# no "-r" option to "cp" because there must be no subdirectories
# see https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch04s04.html
# and https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s13.html
-cp $(RUN_BUILDOUT_DIR)/parts/mca/bin/* $(INSTALL_DIR)/bin/
# etc
-cp -r $(RUN_BUILDOUT_DIR)/parts/mca/etc/* $(INSTALL_DIR)/etc/
# next line: in case flb.conf is moved to from mca to fluentbit-plugin-wendelin
-cp -r $(RUN_BUILDOUT_DIR)/parts/fluentbit-plugin-wendelin/etc/* $(INSTALL_DIR)/etc/
-cp -r $(RUN_BUILDOUT_DIR)/parts/openssl/etc/* $(INSTALL_DIR)/etc/
# remove links to certs in parts/ca-certificates/[...]: not supported for now
-rm -rf $(INSTALL_DIR)/etc/ssl/certs
# include
#-cp -r $(RUN_BUILDOUT_DIR)/parts/fluentbit-plugin-wendelin/include/* $(INSTALL_DIR)/include/
#-cp -r $(RUN_BUILDOUT_DIR)/parts/openssl/include/* $(INSTALL_DIR)/include/
# lib
#-cp -r $(RUN_BUILDOUT_DIR)/parts/openssl/lib/libcrypto* $(INSTALL_DIR)/lib/
-cp $(RUN_BUILDOUT_DIR)/parts/fluentbit-plugin-wendelin/lib/* $(INSTALL_DIR)/lib/
# LIBCRYPTO
# TODO: then next "cp" is a workaroung because libcrypto.so or libcrypto.a from slapos doesn't work
# this should be fixed asap
#-cp /lib/x86_64-linux-gnu/libcrypto.so.1.1 $(INSTALL_DIR)/lib/
# LIBFMT
#-cp -r $(RUN_BUILDOUT_DIR)/parts/fmtlib/lib/libfmt.so* $(INSTALL_DIR)/lib/
# share
-cp -r $(RUN_BUILDOUT_DIR)/parts/mca/share/* $(INSTALL_DIR)/share/
# TODO: what is it actually needed from openssl...?
#-cp -r $(RUN_BUILDOUT_DIR)/parts/openssl/share/* $(INSTALL_DIR)/share/
-cp -r $(RUN_BUILDOUT_DIR)/parts/fluentbit-plugin-wendelin/share/* $(INSTALL_DIR)/share/
# DEBUG
ls -Rl $(INSTALL_DIR)/bin/ # DEBUG
ls -Rl $(INSTALL_DIR)/etc/ # DEBUG
#ls -Rl $(INSTALL_DIR)/include/ # DEBUG
ls -Rl $(INSTALL_DIR)/lib/ # DEBUG
ls -Rl $(INSTALL_DIR)/share/ # DEBUG
.PHONY: build all clean install
[buildout]
rootdir = %TARGET_DIR%
destdir = %BUILD_DIR%
builddir = %RUN_BUILDOUT_DIR%
extends =
%SR_PATH%
versions = versions
extends-cache = extends-cache
download-cache = download-cache
[versions]
setuptools = 44.1.1
# Use SlapOS patched zc.buildout
zc.buildout = 2.7.1+slapos016
# Use SlapOS patched zc.recipe.egg (zc.recipe.egg 2.x is for Buildout 2)
zc.recipe.egg = 2.0.3+slapos003
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment