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
|
ifndef RHEL_VERSION
|
||||||
RHEL_VERSION=5
|
RHEL_VERSION=5
|
||||||
endif
|
endif
|
||||||
|
ifndef PREFIX
|
||||||
|
PREFIX=/usr
|
||||||
|
endif
|
||||||
ifeq ($(RHEL_VERSION),5)
|
ifeq ($(RHEL_VERSION),5)
|
||||||
MOCKFLAGS=--define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5"
|
MOCKFLAGS=--define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5"
|
||||||
endif
|
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)"
|
/usr/bin/mock --verbose -r epel-$(RHEL_VERSION)-noarch ./dist/$(SRPM) --resultdir ./dist/ --define "version $(VERSION)" --define "release $(RHEL_RELEASE)"
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(PREFIX)/usr/bin/taggit.sh
|
rm -f $(PREFIX)/bin/taggit.sh
|
||||||
rm -f $(PREFIX)/usr/bin/taghg.sh
|
rm -f $(PREFIX)/bin/taghg.sh
|
||||||
rm -f $(PREFIX)/usr/bin/gitversion.sh
|
rm -f $(PREFIX)/bin/gitversion.sh
|
||||||
rm -f $(PREFIX)/usr/bin/hgversion.sh
|
rm -f $(PREFIX)/bin/hgversion.sh
|
||||||
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
mkdir -p $(PREFIX)/usr/bin
|
mkdir -p $(PREFIX)/bin
|
||||||
install ./gitversion.sh $(PREFIX)/usr/bin/gitversion.sh
|
install ./gitversion.sh $(PREFIX)/bin/gitversion.sh
|
||||||
install ./hgversion.sh $(PREFIX)/usr/bin/hgversion.sh
|
install ./hgversion.sh $(PREFIX)/bin/hgversion.sh
|
||||||
install ./taggit.sh $(PREFIX)/usr/bin/taggit.sh
|
install ./taggit.sh $(PREFIX)/bin/taggit.sh
|
||||||
install ./taghg.sh $(PREFIX)/usr/bin/taghg.sh
|
install ./taghg.sh $(PREFIX)/bin/taghg.sh
|
||||||
|
|
||||||
MANIFEST:
|
MANIFEST:
|
||||||
echo /usr/bin/gitversion.sh > MANIFEST
|
echo $(PREFIX)/bin/gitversion.sh > MANIFEST
|
||||||
echo /usr/bin/hgversion.sh >> MANIFEST
|
echo $(PREFIX)/bin/hgversion.sh >> MANIFEST
|
||||||
echo /usr/bin/taggit.sh >> MANIFEST
|
echo $(PREFIX)/bin/taggit.sh >> MANIFEST
|
||||||
echo /usr/bin/taghg.sh >> MANIFEST
|
echo $(PREFIX)/bin/taghg.sh >> MANIFEST
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -1,8 +1,6 @@
|
|||||||
Versioners
|
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.
|
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
|
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.
|
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
|
Generate a version
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user