Skip to content
Snippets Groups Projects
Commit 8ba6217d authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Corrected rpm building verion numering

parent d3250ac7
No related branches found
No related tags found
No related merge requests found
TARGET=md5toc
MD5TOC_VERSION=$(shell git describe | sed -e 's/^v//')
MD5TOC_VERSION=$(shell git describe | sed -e 's/^v//;s/-/_/g')
SOURCES=Makefile md5toc.c md5toc.spec config.h md5.c md5.h
CFLAGS=-Wall -Werror -I. -DMD5TOC_VERSION='"$(MD5TOC_VERSION)"'
......@@ -15,7 +15,8 @@ md5toc.tar: $(SOURCES)
tar -cvf $@ --transform 's|.*|md5toc/&|' $^
md5toc.spec: md5toc.spec.template Makefile
sed -e 's/__MD5TOC_VERSION__/$(MD5TOC_VERSION)/;s/-/_/g' $< > $@
sed -e 's/__MD5TOC_VERSION__/$(MD5TOC_VERSION)/' $< > $@
echo $(MD5TOC_VERSION:%-=%-)
srpm: md5toc.spec md5toc.tar Makefile
rpmbuild --define "_topdir $$(pwd)" \
......
......@@ -5,7 +5,7 @@ Summary: A simple utility to create a TOC of a directory
License: GPLv3
Source0: http://control.lth.se/md5toc.tar
BuildRequires: libattr-devel
#BuildRequires: libattr-devel
%description
A simple utility to create a TOC of a directory
......@@ -14,7 +14,7 @@ A simple utility to create a TOC of a directory
%setup -q -n %{name}
%build
make -DMD5TOC_VERSION='"__MD5TOC_VERSION__"'
make MD5TOC_VERSION=__MD5TOC_VERSION__
file md5toc
%install
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment