diff options
Diffstat (limited to 'actions/Makefile.am')
-rw-r--r-- | actions/Makefile.am | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/actions/Makefile.am b/actions/Makefile.am index e3451aa..2c1641b 100644 --- a/actions/Makefile.am +++ b/actions/Makefile.am @@ -1,3 +1,5 @@ +EXTRA_DIST = build_deb.sh build_rpm.sh + DEBUILD_ARGS = SAVE_CONTAINER = no @@ -8,16 +10,13 @@ clean-local: actions_build_deb: IMAGE_NAME = debian actions_build_deb: IMAGE_VERSION = unstable actions_build_deb: CONTAINER_NAME = $(PACKAGE_NAME)_$@_$(IMAGE_NAME)-$(IMAGE_VERSION) -actions_build_deb: DEPENDENCY_LIST = autoconf-archive debmake devscripts liblua5.1-0-dev lua5.1 ncurses-dev pkg-config -actions_build_deb: ../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz +actions_build_deb: ../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz build_deb.sh podman pull docker.io/library/$(IMAGE_NAME):$(IMAGE_VERSION) podman container exists "$(CONTAINER_NAME)" || podman run -itd --name "$(CONTAINER_NAME)" "$(IMAGE_NAME):$(IMAGE_VERSION)" podman exec "$(CONTAINER_NAME)" mkdir -p /tmp/build podman cp "../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz" "$(CONTAINER_NAME)":/tmp/build - podman exec -w /tmp/build "$(CONTAINER_NAME)" apt-get -y update - podman exec -w /tmp/build "$(CONTAINER_NAME)" apt-get -y upgrade - podman exec -w /tmp/build "$(CONTAINER_NAME)" apt install -y $(DEPENDENCY_LIST) - podman exec -w /tmp/build "$(CONTAINER_NAME)" debmake -y -a $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz -i debuild $(DEBUILD_ARGS) + podman cp "build_deb.sh" "$(CONTAINER_NAME)":/tmp/build + podman exec -w /tmp/build "$(CONTAINER_NAME)" ./build_deb.sh $(IMAGE_NAME) $(IMAGE_VERSION) $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(DEBUILD_ARGS) mkdir -p "build/$@/$(IMAGE_NAME)-$(IMAGE_VERSION)" podman cp "$(CONTAINER_NAME)":/tmp/build/. "build/$@/$(IMAGE_NAME)-$(IMAGE_VERSION)/" if [ "$(SAVE_CONTAINER)" = "no" ]; then podman kill "$(CONTAINER_NAME)" && podman rm "$(CONTAINER_NAME)"; fi @@ -26,16 +25,15 @@ actions_build_deb: ../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz actions_build_rpm: IMAGE_NAME = fedora actions_build_rpm: IMAGE_VERSION = rawhide actions_build_rpm: CONTAINER_NAME = $(PACKAGE_NAME)_$@_$(IMAGE_NAME)-$(IMAGE_VERSION) -actions_build_rpm: DEPENDENCY_LIST = gcc lua lua-devel make ncurses-devel rpmdevtools rpmlint -actions_build_rpm: ../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz +actions_build_rpm: ../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz build_rpm.sh podman pull docker.io/library/$(IMAGE_NAME):$(IMAGE_VERSION) podman container exists "$(CONTAINER_NAME)" || podman run -itd --name "$(CONTAINER_NAME)" "$(IMAGE_NAME):$(IMAGE_VERSION)" - podman exec "$(CONTAINER_NAME)" yum makecache - podman exec "$(CONTAINER_NAME)" yum install -y $(DEPENDENCY_LIST) - podman exec "$(CONTAINER_NAME)" rpmdev-setuptree + podman exec "$(CONTAINER_NAME)" mkdir -p /root/rpmbuild/SOURCES + podman exec "$(CONTAINER_NAME)" mkdir -p /root/rpmbuild/SPECS podman cp "../$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz" "$(CONTAINER_NAME)":/root/rpmbuild/SOURCES/ podman cp "../spec/$(PACKAGE_NAME).spec" "$(CONTAINER_NAME)":/root/rpmbuild/SPECS/ - podman exec "$(CONTAINER_NAME)" rpmbuild -ba /root/rpmbuild/SPECS/$(PACKAGE_NAME).spec + podman cp "build_rpm.sh" "$(CONTAINER_NAME)":/root/ + podman exec "$(CONTAINER_NAME)" /root/build_rpm.sh $(IMAGE_NAME) $(IMAGE_VERSION) $(PACKAGE_NAME).spec mkdir -p "build/$@/$(IMAGE_NAME)-$(IMAGE_VERSION)" podman cp "$(CONTAINER_NAME)":/root/rpmbuild/. "build/$@/$(IMAGE_NAME)-$(IMAGE_VERSION)/" if [ "$(SAVE_CONTAINER)" = "no" ]; then podman kill "$(CONTAINER_NAME)" && podman rm "$(CONTAINER_NAME)"; fi |