Script for building a release without the SDK installed

This commit is contained in:
Thomas Perl 2014-10-25 14:08:58 +02:00
parent b47ef42c1c
commit 32a38f3289
2 changed files with 48 additions and 0 deletions

6
README
View file

@ -4,3 +4,9 @@ gPodder 4 for Sailfish OS
This repository contains the platform-specific customizations and packaging for This repository contains the platform-specific customizations and packaging for
running gPodder 4 on Sailfish OS. Python 3.3.3 and PyOtherSide is already included running gPodder 4 on Sailfish OS. Python 3.3.3 and PyOtherSide is already included
in the device repositories starting with Sailfish OS 1.0.3.8. in the device repositories starting with Sailfish OS 1.0.3.8.
To build, make sure you have make and rpm installed, then:
make -f dist.mk
This should give you an installable .rpm file in the current directory.

42
dist.mk Normal file
View file

@ -0,0 +1,42 @@
# Make distribution RPM
# Thomas Perl <m@thp.io>
# Required packages (build-dependencies): rpm
SPECSRC := rpm/harbour-org.gpodder.sailfish.spec
RPMBUILD_ROOT := ~/rpmbuild
NAME := $(shell rpmspec --query --queryformat='%{name}' $(SPECSRC))
VERSION := $(shell rpmspec --query --queryformat='%{version}' $(SPECSRC))
RELEASE := $(shell rpmspec --query --queryformat='%{release}' $(SPECSRC))
SOURCES := README gpodder-core podcastparser gpodder-ui-qml qml
RPMSRC := $(wildcard rpm/*.png rpm/*.desktop)
TARNAME := $(NAME)-$(VERSION).tar.gz
SPECNAME := $(NAME)-$(VERSION).spec
RPMNAME := $(NAME)-$(VERSION)-$(RELEASE).noarch.rpm
all: rpm
rpm: $(SPECNAME) $(TARNAME)
mkdir -p $(RPMBUILD_ROOT)/SOURCES
cp $(RPMSRC) $(TARNAME) $(RPMBUILD_ROOT)/SOURCES/
rpmbuild -bb --clean $(SPECNAME)
cp $(RPMBUILD_ROOT)/RPMS/noarch/$(RPMNAME) .
$(TARNAME):
rm -rf tmp
mkdir -p tmp/$(NAME)-$(VERSION)
cp -rpv $(SOURCES) tmp/$(NAME)-$(VERSION)/
tar -C tmp -czvf $@ $(NAME)-$(VERSION)
$(SPECNAME): rpm/$(NAME).spec
cp $< $@
clean:
rm -rf $(SPECNAME) $(TARNAME) tmp
distclean: clean
rm -f $(RPMNAME)
.DEFAULT: all
.PHONY: all rpm clean distclean