Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

44 lines (38 sloc) 1.414 kb
VERSION := 1.5.0
SHELL := /bin/bash
SPEC := s3cmd.spec
COMMIT := $(shell git rev-parse HEAD)
SHORTCOMMIT := $(shell git rev-parse --short=8 HEAD)
TARBALL = s3cmd-$(VERSION)-$(SHORTCOMMIT).tar.gz
release:
python setup.py register sdist upload
clean:
-rm -rf s3cmd-*.tar.gz *.rpm *~ $(SPEC)
-find . -name \*.pyc -exec rm \{\} \;
-find . -name \*.pyo -exec rm \{\} \;
$(SPEC): $(SPEC).in
sed -e 's/##VERSION##/$(VERSION)/' \
-e 's/##COMMIT##/$(COMMIT)/' \
-e 's/##SHORTCOMMIT##/$(SHORTCOMMIT)/' \
$(SPEC).in > $(SPEC)
tarball:
git archive --format tar --prefix s3cmd-$(COMMIT)/ HEAD | gzip -c > $(TARBALL)
# Use older digest algorithms for local rpmbuilds, as EPEL5 and
# earlier releases need this. When building using mock for a
# particular target, it will use the proper (newer) digests if that
# target supports it.
rpm: clean tarball $(SPEC)
tmp_dir=`mktemp -d` ; \
mkdir -p $${tmp_dir}/{BUILD,RPMS,SRPMS,SPECS,SOURCES} ; \
cp $(TARBALL) $${tmp_dir}/SOURCES ; \
cp $(SPEC) $${tmp_dir}/SPECS ; \
cd $${tmp_dir} > /dev/null 2>&1; \
rpmbuild -ba --define "_topdir $${tmp_dir}" \
--define "_source_filedigest_algorithm 0" \
--define "_binary_filedigest_algorithm 0" \
--define "dist %{nil}" \
SPECS/$(SPEC) ; \
cd - > /dev/null 2>&1; \
cp $${tmp_dir}/RPMS/noarch/* $${tmp_dir}/SRPMS/* . ; \
rm -rf $${tmp_dir} ; \
rpmlint *.rpm *.spec
Jump to Line
Something went wrong with that request. Please try again.