Commit f8b71b494608dde5ef69c25e784bfb31f4b288ca
1 parent
a0530b0a
Exists in
master
and in
67 other branches
Fixed make to allow building packages in vagrant envs
Showing
1 changed file
with
12 additions
and
5 deletions
Show diff stats
src/pkg-rpm/Makefile
| 1 | 1 | OBSPROJECT = isv:spb:devel |
| 2 | +COPR_PROJECT = softwarepublico/v4 | |
| 3 | +LOCAL_BUILD_DIR = $(PWD)/build | |
| 4 | + | |
| 5 | +# Vagrant environment does not accept links from/to shared folder | |
| 6 | +ifeq "$(PWD)" "/vagrant" | |
| 7 | +LOCAL_BUILD_DIR = /home/vagrant/rpmbuild/ | |
| 8 | +endif | |
| 2 | 9 | |
| 3 | 10 | ############################################################################# |
| 4 | 11 | |
| ... | ... | @@ -20,7 +27,7 @@ all: |
| 20 | 27 | @echo '$$ make build-all builds all packages locally' |
| 21 | 28 | @echo |
| 22 | 29 | @echo |
| 23 | - @echo 'Working with OBS (deprecated):' | |
| 30 | + @echo 'Working with OBS (deprecated):' | |
| 24 | 31 | @echo |
| 25 | 32 | @echo '$$ make $${pkg}-checkout-obs checkout $${pkg}' |
| 26 | 33 | @echo '$$ make $${pkg}-upload-obs uploads package $${pkg}' |
| ... | ... | @@ -52,10 +59,10 @@ diff_packages_obs = $(patsubst %, %-diff-obs, $(packages)) |
| 52 | 59 | build-all: $(build_packages) |
| 53 | 60 | |
| 54 | 61 | $(build_packages): %-build : % |
| 55 | - mkdir -p build/SOURCES | |
| 56 | - cp $*/*.tar.* build/SOURCES/ | |
| 57 | - cp $*/*.patch build/SOURCES/ || true | |
| 58 | - cd $* && $(BUILD_PREFIX) rpmbuild --define "_topdir $(PWD)/build/" -bb $*.spec | |
| 62 | + mkdir -p $(LOCAL_BUILD_DIR)/SOURCES | |
| 63 | + cp $*/*.tar.* $(LOCAL_BUILD_DIR)/SOURCES/ | |
| 64 | + cp $*/*.patch $(LOCAL_BUILD_DIR)/SOURCES/ || true | |
| 65 | + cd $* && $(BUILD_PREFIX) rpmbuild --define "_topdir $(LOCAL_BUILD_DIR)" -bb $*.spec | |
| 59 | 66 | |
| 60 | 67 | $(build_src_packages): %-build-src : % |
| 61 | 68 | mkdir -p build/SOURCES | ... | ... |