Fix makefile to properly use a user-provided prefix
This commit is contained in:
29
Makefile
29
Makefile
@@ -6,6 +6,9 @@ SPECFILE=versioners.spec
|
||||
ifndef RHEL_VERSION
|
||||
RHEL_VERSION=5
|
||||
endif
|
||||
ifndef PREFIX
|
||||
PREFIX=/usr
|
||||
endif
|
||||
ifeq ($(RHEL_VERSION),5)
|
||||
MOCKFLAGS=--define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5"
|
||||
endif
|
||||
@@ -75,21 +78,21 @@ $(RHEL_DISTFILE): $(DISTFILE)
|
||||
/usr/bin/mock --verbose -r epel-$(RHEL_VERSION)-noarch ./dist/$(SRPM) --resultdir ./dist/ --define "version $(VERSION)" --define "release $(RHEL_RELEASE)"
|
||||
|
||||
uninstall:
|
||||
rm -f $(PREFIX)/usr/bin/taggit.sh
|
||||
rm -f $(PREFIX)/usr/bin/taghg.sh
|
||||
rm -f $(PREFIX)/usr/bin/gitversion.sh
|
||||
rm -f $(PREFIX)/usr/bin/hgversion.sh
|
||||
rm -f $(PREFIX)/bin/taggit.sh
|
||||
rm -f $(PREFIX)/bin/taghg.sh
|
||||
rm -f $(PREFIX)/bin/gitversion.sh
|
||||
rm -f $(PREFIX)/bin/hgversion.sh
|
||||
|
||||
|
||||
install:
|
||||
mkdir -p $(PREFIX)/usr/bin
|
||||
install ./gitversion.sh $(PREFIX)/usr/bin/gitversion.sh
|
||||
install ./hgversion.sh $(PREFIX)/usr/bin/hgversion.sh
|
||||
install ./taggit.sh $(PREFIX)/usr/bin/taggit.sh
|
||||
install ./taghg.sh $(PREFIX)/usr/bin/taghg.sh
|
||||
mkdir -p $(PREFIX)/bin
|
||||
install ./gitversion.sh $(PREFIX)/bin/gitversion.sh
|
||||
install ./hgversion.sh $(PREFIX)/bin/hgversion.sh
|
||||
install ./taggit.sh $(PREFIX)/bin/taggit.sh
|
||||
install ./taghg.sh $(PREFIX)/bin/taghg.sh
|
||||
|
||||
MANIFEST:
|
||||
echo /usr/bin/gitversion.sh > MANIFEST
|
||||
echo /usr/bin/hgversion.sh >> MANIFEST
|
||||
echo /usr/bin/taggit.sh >> MANIFEST
|
||||
echo /usr/bin/taghg.sh >> MANIFEST
|
||||
echo $(PREFIX)/bin/gitversion.sh > MANIFEST
|
||||
echo $(PREFIX)/bin/hgversion.sh >> MANIFEST
|
||||
echo $(PREFIX)/bin/taggit.sh >> MANIFEST
|
||||
echo $(PREFIX)/bin/taghg.sh >> MANIFEST
|
||||
|
||||
15
README.md
15
README.md
@@ -1,8 +1,6 @@
|
||||
Versioners
|
||||
==========
|
||||
|
||||
[](http://jenkins.aklabs.net/view/versioners/job/versioners-test/)
|
||||
|
||||
This is a set of scripts that I use for automatically tagging, and generating version/build metadata for, mercurial and git projects. They provide your automation with quite a bit of information about the version being built, where it is built, and who built it. They also generate automatic changelogs for you.
|
||||
|
||||
Assumptions
|
||||
@@ -40,6 +38,19 @@ OS_VERSION will contain the version number of the OS_NAME in question, except fo
|
||||
|
||||
These don't support debian yet - feel free to submit a patch.
|
||||
|
||||
Installing
|
||||
==========
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
The default location is in `/usr`. To change the installation location specify `PREFIX`
|
||||
|
||||
```
|
||||
PREFIX=/custom/location make install
|
||||
```
|
||||
|
||||
Generate a version
|
||||
==================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user