Skip to content

Commit 6f71dda

Browse files
committed
Added support for separate specs for SUSE and alt. For now these specs are just copies of centos one
1 parent b097974 commit 6f71dda

File tree

3 files changed

+800
-2
lines changed

3 files changed

+800
-2
lines changed

Makefile.pkg

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
TOKEN ?= $(PACKAGECLOUD_TOKEN)
2+
# Check for SUSE and alt linux which need specific spec file
3+
ifeq "$(wildcard /etc/SuSE-rel*)" ""
4+
ifeq "$(wildcard /etc/altlinux-rel*)" ""
5+
SPEC=mamonsu.spec
6+
else
7+
SPEC=mamonsu.alt.spec
8+
endif
9+
else
10+
SPEC=mamonsu.suse.spec
11+
endif
212

313
prepare_builddir: clean
414
mkdir -p build
@@ -14,9 +24,9 @@ deb: prepare_builddir
1424
cd $(BUILDDIR) && cp -a $(WORKDIR)/packaging/debian . && dpkg-buildpackage -b
1525
cp -av build/mamonsu*.deb .
1626

17-
rpm: prepare_builddir
27+
rpm: prepare_builddir $(BUILDDIR)/packaging/rpm/SPECS/$(SPEC)
1828
rpmbuild -ba --define '_topdir $(BUILDDIR)/packaging/rpm'\
19-
$(BUILDDIR)/packaging/rpm/SPECS/mamonsu.spec
29+
$(BUILDDIR)/packaging/rpm/SPECS/$(SPEC)
2030
cp -av $(BUILDDIR)/packaging/rpm/RPMS/noarch/mamonsu*.rpm .
2131

2232
pkg: build/prepare build/all

0 commit comments

Comments
 (0)