diff --git a/Makefile b/Makefile index b994214..a285f4c 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,17 @@ +packages = $(shell basename --suffix=.spec specs/*/*.spec) + all: @echo "Usage:" @echo - @echo 'make gitlab # uploads gitlab.spec to obs' - @echo 'make gitlab-shell # uploads gitlab-shell.spec to obs' - -gitlab gitlab-shell: - $(MAKE) upload PACKAGE=$@ + @for pkg in $(packages); do printf 'make %-20s # uploads %s.spec to obs\n' $$pkg $$pkg; done -obs_project = isv:spb:gitlab +$(packages): + @spec=$$(find specs/ -name $@.spec); \ + project=isb:spb:$$(basename $$(dirname $$spec)); \ + $(MAKE) upload package=$@ spec=$$spec project=$$project upload: - test -n "$(PACKAGE)" mkdir -p obs - if test -d obs/$(obs_project)/$(PACKAGE); then (cd obs/$(obs_project)/$(PACKAGE) && osc update); else (cd obs && osc checkout $(obs_project) $(PACKAGE)); fi - cp $(PACKAGE).spec obs/isv:spb:gitlab/$(PACKAGE)/ - cd obs/isv:spb:gitlab/$(PACKAGE) && osc commit -m 'Update $(PACKAGE)' + if test -d obs/$(project)/$(package); then (cd obs/$(project)/$(package) && osc update); else (cd obs && osc checkout $(project) $(PACKAGE)); fi + cp $(spec) obs/$(project)/$(package)/ + cd obs/$(project)/$(PACKAGE) && osc commit -m 'Update $(package)' diff --git a/gitlab-shell.spec b/gitlab-shell.spec deleted file mode 100644 index e40845d..0000000 --- a/gitlab-shell.spec +++ /dev/null @@ -1,83 +0,0 @@ -Name: gitlab-shell -Version: 2.4.0 -Release: 2%{?dist} -Summary: Software Development Platform - -Group: Development/Tools -License: Expat -URL: https://gitlab.com/gitlab-org/gitlab-shell -Source0: %{name}-%{version}.tar.gz -BuildArch: noarch - -# BuildRequires: -Requires: ruby >= 1.9, redis - -%description -Gitlab-shell - -%prep -%setup -q - -%build -cat > config.yml < config/gitlab.yml <= 1.9, redis + +%description +Gitlab-shell + +%prep +%setup -q + +%build +cat > config.yml < config/gitlab.yml <