RPM SPEC: fix prefix for git builds
[siplcs.git] / contrib / rpm / pidgin-sipe.spec
blob19c017a8ec497c3833ebf761bbfc057c7f125798
2 # Example SPEC file to generate a RPM for pidgin-sipe.
3 # It should work out-of-the-box on Fedora 10/11 and RHEL5.
5 %if 0%{?_with_git:1}
6 #------------------------------- BUILD FROM GIT -------------------------------
7 # Add "--with git" to the rpmbuild command line to build from git
9 # Instructions how to access the repository: http://sipe.sourceforge.net/git/
11 # Run "./git-snapshot.sh ." in your local repository.
12 # Then update the following line from the generated archive name
13 %define git 20090808git16300ed
14 # Increment when you generate several RPMs on the same day...
15 %define gitcount 0
16 #------------------------------- BUILD FROM GIT -------------------------------
17 %endif
19 Name: pidgin-sipe
20 Summary: Pidgin plugin for connecting to Microsoft LCS/OCS
21 Version: 1.6.0
22 %if 0%{?_with_git:1}
23 Release: %{gitcount}.%{git}%{?dist}
24 Source: %{name}-%{git}.tar.bz2
25 %else
26 Release: 1%{?dist}
27 Source: http://downloads.sourceforge.net/sipe/%{name}-%{version}.tar.bz2
28 %endif
29 Group: Applications/Internet
30 License: GPLv2+
31 URL: http://sipe.sourceforge.net/
33 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
35 BuildRequires: zlib-devel, libpurple-devel, libtool, intltool, gettext-devel
36 BuildRequires: krb5-devel
37 # Required for com_err.h
38 BuildRequires: e2fsprogs-devel
41 %description
42 Provides an Open Implementation of SIP/Simple protocol for connecting Pidgin to
43 Live Communications Server 2003/2005 and Office Communications Server 2007.
46 %prep
47 %if 0%{?_with_git:1}
48 %setup -q -n %{name}-%{git}
49 %else
50 %setup -q
51 %endif
54 %build
55 %if 0%{?_with_git:1}
56 # Copied from "rpmbuild --showrc" configure definition
57 export CFLAGS="${CFLAGS:-%optflags}"
58 ./autogen.sh --prefix=/usr --with-krb5
59 %else
60 %configure --with-krb5
61 %endif
63 make %{_smp_mflags}
66 %install
67 %makeinstall
68 %find_lang %{name}
70 # NOTE: We intentionally don't ship *.la files
71 find $RPM_BUILD_ROOT -type f -name '*.la' | xargs rm -f -- || :
74 %clean
75 rm -rf $RPM_BUILD_ROOT
78 %files -f %{name}.lang
79 %defattr(-,root,root,-)
80 %doc AUTHORS ChangeLog COPYING NEWS README TODO
81 %{_libdir}/pidgin/libsipe.so
82 %{_datadir}/pixmaps/pidgin/protocols/*/sipe.png
85 %changelog
86 * Sat Aug 08 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
87 - fix prefix for git builds
89 * Sat Aug 01 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
90 - append -Wno-unused-parameter for GCC <4.4 compilation errors
92 * Thu Jul 30 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
93 - remove duplicate GPL2
95 * Thu Jul 30 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
96 - use "--with git" to build from git
97 - corrected download URL for release archive
98 - add missing BR gettext-devel
100 * Wed Jul 29 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
101 - use default rpmbuild CFLAGS also for git builds
102 - merge with SPEC files created by mricon & jberanek
104 * Tue Jul 28 2009 J. D. User <jduser@noreply.com> 1.6.0-*git*
105 - initial RPM SPEC example generated