diff --git a/README b/README index a136cc5..be13992 100644 --- a/README +++ b/README @@ -4,3 +4,9 @@ gPodder 4 for Sailfish OS 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 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. diff --git a/dist.mk b/dist.mk new file mode 100644 index 0000000..983beed --- /dev/null +++ b/dist.mk @@ -0,0 +1,42 @@ +# Make distribution RPM +# Thomas Perl +# 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