File Makefile of Package venv-openstack-octavia

PACKAGE = openstack-octavia
PROJECT = Cloud:OpenStack:Pike
REPOSITORY = SLE_12_SP3
ARCH = x86_64


build:
	osc build --clean --noverify $(REPOSITORY)

update-include:
        # Include initially the elements of the repository.  This can
        # be adjusted manually later.
        #
        # Note that `exclude` takes precedence over `include`.  So if
        # a package match both constrains, it will be excluded.
        #
	mv include-rpm include-rpm.BAK 2> /dev/null
	./venvjail include --project $(PROJECT) \
                           --repo $(REPOSITORY) \
                           --arch $(ARCH) > include-rpm

update-exclude:
        # Exclude initially some usual paterns for packages.  This can
        # be adjusted manually later.
        #
        # Note that `exclude` takes precedence over `include`.  So if
        # a package match both constrains, it will be excluded.
        #
	mv exclude-rpm exclude-rpm.BAK 2> /dev/null
	./venvjail exclude > exclude-rpm

update-spec:
        # Update the BuildRequires
	cp -a venv-$(PACKAGE).spec venv-$(PACKAGE).spec.BAK 2> /dev/null
	./venvjail binary $(PACKAGE) \
                          --project $(PROJECT) \
                          --repo $(REPOSITORY) \
                          --arch $(ARCH) > binary_tmp
	set -e; \
	sed -i -e 's/^/BuildRequires:  /' binary_tmp; \
	start='^# --- \[venvjail - BuildRequires\] START ---$$'; \
	end='^# --- \[venvjail - BuildRequires\] END ---$$'; \
	sed -i -ne "/$$start/ {p; r binary_tmp" -e ":a; n; /$$end/ {p; b}; ba}; p" venv-$(PACKAGE).spec
	rm binary_tmp

	./venvjail requires $(PACKAGE) \
                            --project $(PROJECT) > requires_tmp
	set -e; \
	sed -i -e 's/^/Requires:       /' requires_tmp; \
	start='^# --- \[venvjail - Requires\] START ---$$'; \
	end='^# --- \[venvjail - Requires\] END ---$$'; \
	sed -i -ne "/$$start/ {p; r requires_tmp" -e ":a; n; /$$end/ {p; b}; ba}; p" venv-$(PACKAGE).spec
	rm requires_tmp
openSUSE Build Service is sponsored by