]> git.pld-linux.org Git - packages/ekg2.git/blobdiff - ekg2.spec
- with svn: embed svn rev number into version string (thx, wiechu)
[packages/ekg2.git] / ekg2.spec
index e47a2695b5b18c569bb0d4f071da2a28b255e200..f206a091f10a05864bae6e5939b9ec54efb19915 100644 (file)
--- a/ekg2.spec
+++ b/ekg2.spec
@@ -9,7 +9,7 @@
 %bcond_without feed                    # don't build feed plugin
 %bcond_without gadugadu                # don't build gg plugin
 %bcond_without gpg                     # don't build gpg plugin
-%bcond_without gtk                     # don't build gtk plugin
+%bcond_with    gtk                     # don't build gtk plugin
 %bcond_without jabber                  # don't build jabber plugin
 %bcond_without gnutls                  # build jabber plugin without libgnutls
 %bcond_without libgsm                  # don't build libgsm plugin
 %bcond_with    svn                     # checkout svn trunk instead of Source0 - requested by ekg2 developer
 
 %if %{with svn}
-%define                _snap svn.%(date +%Y%m%d)
+%define                subver svn.%(date +%Y%m%d)
 %else
-%define                _snap 20100816
+%define                subver 20101110
 %endif
 
 %define                rel 1
 
-%if %{without jabber}
-%undefine with_gnutls
-%endif
-
 %if %{with sqlite}
 %undefine sqlite3
 %endif
@@ -41,13 +37,13 @@ Summary:    Multi-protocol instant messaging and chat client
 Summary(pl.UTF-8):     Wieloprotokołowy komunikator internetowy
 Name:          ekg2
 Version:       0.3
-Release:       0.%{_snap}.%{rel}
+Release:       0.%{subver}.%{rel}
 Epoch:         2
 License:       GPL v2+
 Group:         Applications/Communications
 %if %{without svn}
-Source0:       http://pl.ekg2.org/%{name}-%{_snap}.tar.bz2
-# Source0-md5: 1e494941aa4d8c6dddec64cbf632cd19
+Source0:       http://pl.ekg2.org/%{name}-%{subver}.tar.bz2
+# Source0-md5: 908ae66c4ab677671423316ed8eb7793
 %endif
 Patch0:                %{name}-perl-install.patch
 Patch1:                %{name}-gtk.patch
@@ -77,9 +73,9 @@ BuildRequires:        pkgconfig
 %{?with_readline:BuildRequires:        readline-devel}
 %{?with_python:BuildRequires:  rpm-pythonprov}
 BuildRequires: sed >= 4.0
-%{?with_svn:BuildRequires:     subversion}
 %{?with_sqlite:BuildRequires:  sqlite-devel}
 %{?with_sqlite3:BuildRequires: sqlite3-devel}
+%{?with_svn:BuildRequires:     subversion}
 %{?with_xosd:BuildRequires:    xosd-devel}
 BuildRequires: zlib-devel
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -338,12 +334,20 @@ Wtyczka xosd dla ekg2.
 
 %prep
 %if %{without svn}
-%setup -q -n %{name}-%{_snap}
+%setup -q -n %{name}-%{subver}
 %else
 %setup -qcT
 cd ..
-svn -q co http://toxygen.net/svn/ekg2/trunk %{name}-%{version}
+repo="http://toxygen.net/svn/ekg2/trunk"
+svn -q export --force $repo %{name}-%{version}
 cd -
+v=$(LANG=C svn info $repo/INSTALL 2>/dev/null|sed -n 's/^Revision: \([0-9]\+\)$/\1/p')
+if [ "$v" ]; then
+    echo SVN-rev.$v
+    v="SVN rev.$v"
+    sed -i "s/AM_INIT_AUTOMAKE(ekg2, CVS)/AM_INIT_AUTOMAKE(ekg2, \"$v\")/" configure.ac
+fi
+
 %endif
 
 %patch0 -p1
This page took 0.070564 seconds and 4 git commands to generate.