Blame Makefile.am

Packit 8ea169
ACLOCAL_AMFLAGS = -I m4
Packit 8ea169
SUBDIRS = src doc po icons tests apidoc
Packit 8ea169
Packit 8ea169
EXTRA_DIST = doc/coding-style abrt.spec.in abrt.pc.in \
Packit 8ea169
	abrt-version asciidoc.conf init-scripts/* \
Packit 8ea169
	augeas/test_abrt.aug
Packit 8ea169
Packit 8ea169
dist_doc_DATA = README.md
Packit 8ea169
Packit 8ea169
pkgconfigdir = $(libdir)/pkgconfig
Packit 8ea169
pkgconfig_DATA = abrt.pc
Packit 8ea169
Packit 8ea169
augeasdir = $(AUGEAS_LENS_LIB_DIR)
Packit 8ea169
dist_augeas_DATA = augeas/abrt.aug
Packit 8ea169
Packit 8ea169
check-local:
Packit 8ea169
	$(AUGPARSE) -I $(top_builddir)/augeas $(top_builddir)/augeas/test_abrt.aug
Packit 8ea169
Packit 8ea169
systemdsystemunitdir = $(prefix)/lib/systemd/system
Packit 8ea169
dist_systemdsystemunit_DATA = init-scripts/abrtd.service \
Packit 8ea169
                              init-scripts/abrt-ccpp.service \
Packit 8ea169
                              init-scripts/abrt-journal-core.service \
Packit 8ea169
                              init-scripts/abrt-oops.service \
Packit 8ea169
                              init-scripts/abrt-xorg.service \
Packit 8ea169
                              init-scripts/abrt-pstoreoops.service \
Packit 8ea169
                              init-scripts/abrt-upload-watch.service
Packit 8ea169
Packit 8ea169
if BUILD_ADDON_VMCORE
Packit 8ea169
dist_systemdsystemunit_DATA += init-scripts/abrt-vmcore.service
Packit 8ea169
endif
Packit 8ea169
Packit 8ea169
if BUILD_ATOMIC
Packit 8ea169
dist_systemdsystemunit_DATA += init-scripts/abrt-coredump-helper.service
Packit 8ea169
endif
Packit 8ea169
Packit 8ea169
systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d
Packit 8ea169
systemdtmpfiles_DATA = init-scripts/abrt.conf
Packit 8ea169
Packit 8ea169
RPM_DIRS = --define "_sourcedir `pwd`" \
Packit 8ea169
	   --define "_rpmdir `pwd`/build" \
Packit 8ea169
	   --define "_specdir `pwd`" \
Packit 8ea169
	   --define "_builddir `pwd`/build" \
Packit 8ea169
	   --define "_srcrpmdir `pwd`/build"
Packit 8ea169
Packit 8ea169
rpm:
Packit 8ea169
	./gen-version
Packit 8ea169
	autoconf --force
Packit 8ea169
	$(MAKE) dist
Packit 8ea169
	rpmbuild $(RPM_DIRS) $(RPM_FLAGS) -ba abrt.spec
Packit 8ea169
Packit 8ea169
srpm:
Packit 8ea169
	./gen-version
Packit 8ea169
	autoconf --force
Packit 8ea169
	$(MAKE) dist
Packit 8ea169
	rpmbuild $(RPM_DIRS) -bs abrt.spec
Packit 8ea169
Packit 8ea169
# value for overriding from command line
Packit 8ea169
# e.g: make scratch-build DIST=f15
Packit 8ea169
DIST=rawhide
Packit 8ea169
scratch-build: srpm
Packit 8ea169
	koji build --scratch $(DIST) `make srpm | grep Wrote | cut -d' ' -f2`
Packit 8ea169
Packit 8ea169
UPLOAD_URL ?= localhost
Packit 8ea169
Packit 8ea169
upload: dist
Packit 8ea169
	scp $(distdir).tar.gz $$(test -n "$$UPLOAD_LOGIN" && echo "$$UPLOAD_LOGIN@")$(UPLOAD_URL)
Packit 8ea169
Packit 8ea169
.PHONY: release-fix
Packit 8ea169
release-fix:
Packit 8ea169
	OLD_VER=$$(git describe --tags --match "[0-9]*" --abbrev=0 HEAD 2>/dev/null); \
Packit 8ea169
	MAJOR_VER=$$(echo $$OLD_VER | cut -d. -f 1); \
Packit 8ea169
	MINOR_VER=$$(echo $$OLD_VER | cut -d. -f 2); \
Packit 8ea169
	FIX_VER=$$(echo $$OLD_VER | cut -d. -f 3); \
Packit 8ea169
	$(MAKE) release OLD_VER=$$OLD_VER NEW_VER="$$MAJOR_VER.$$MINOR_VER.$$((FIX_VER+1))"
Packit 8ea169
Packit 8ea169
.PHONY: release-minor
Packit 8ea169
release-minor:
Packit 8ea169
	OLD_VER=$$(git describe --tags --match "[0-9]*" --abbrev=0 HEAD 2>/dev/null); \
Packit 8ea169
	MAJOR_VER=$$(echo $$OLD_VER | cut -d. -f 1); \
Packit 8ea169
	MINOR_VER=$$(echo $$OLD_VER | cut -d. -f 2); \
Packit 8ea169
	$(MAKE) release OLD_VER=$$OLD_VER NEW_VER="$$MAJOR_VER.$$((MINOR_VER+1)).0"
Packit 8ea169
Packit 8ea169
.PHONY: release-major
Packit 8ea169
release-major:
Packit 8ea169
	OLD_VER=$$(git describe --tags --match "[0-9]*" --abbrev=0 HEAD 2>/dev/null); \
Packit 8ea169
	MAJOR_VER=$$(echo $$OLD_VER | cut -d. -f 1); \
Packit 8ea169
	$(MAKE) release OLD_VER=$$OLD_VER NEW_VER="$$((MAJOR_VER+1)).0.0"
Packit 8ea169
Packit 8ea169
.PHONY: release
Packit 8ea169
release:
Packit 8ea169
	maint/pull-translations || exit 1; \
Packit 8ea169
	echo "* $$(LANG='en_US.UTF-8' date +'%a %b %d %Y') $$(git config --get user.name) <$$(git config --get user.email)> $$NEW_VER-1" | sort > /tmp/changelog.tmp; \
Packit 8ea169
	git log --oneline $$OLD_VER..HEAD | awk '{$$1=""; if (a[$$0]++ == 0) print "-" $$0} END {print ""}' | grep -v -e "- Merge" -e "- testsuite:" -e "- make:" >> /tmp/changelog.tmp; \
Packit 8ea169
	sed "$$(grep -n changelog abrt.spec.in | cut -f1 -d: | head -1)"'r /tmp/changelog.tmp' -i abrt.spec.in; \
Packit 8ea169
	sed -e "s/^## \[Unreleased\]/## [Unreleased]\n\n## [$$NEW_VER]/" \
Packit 8ea169
	    -e "s/^\[Unreleased\]: \(https:\/\/.*\/compare\)\(\/.*\)\.\.\.HEAD/[Unreleased]: \1\/$$NEW_VER...HEAD\n[$$NEW_VER]: \1\2...$$NEW_VER/" \
Packit 8ea169
	    -i CHANGELOG.md; \
Packit 8ea169
	sed 's|DEF_VER=.*$$|DEF_VER='$$NEW_VER'|' -i gen-version; \
Packit 8ea169
	git add gen-version abrt.spec.in CHANGELOG.md; \
Packit 8ea169
	git commit -m "New version $$NEW_VER"; \
Packit 8ea169
	git tag "$$NEW_VER"; \
Packit 8ea169
	echo -n "$$NEW_VER" > abrt-version
Packit 8ea169
	autoconf --force
Packit 8ea169
	$(MAKE) dist