jabberd/jabberd.spec

changeset 540
6becb64fe77d
parent 363
641cacc76b02
child 541
869d6847b13e
     1.1 --- a/jabberd/jabberd.spec	Tue Aug 28 18:30:25 2012 +0200
     1.2 +++ b/jabberd/jabberd.spec	Tue Aug 28 18:30:35 2012 +0200
     1.3 @@ -1,6 +1,6 @@
     1.4  ##
     1.5  ##  jabberd.spec -- OpenPKG RPM Package Specification
     1.6 -##  Copyright (c) 2000-2009 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.7 +##  Copyright (c) 2000-2011 OpenPKG Foundation e.V. <http://openpkg.net/>
     1.8  ##
     1.9  ##  Permission to use, copy, modify, and distribute this software for
    1.10  ##  any purpose with or without fee is hereby granted, provided that
    1.11 @@ -24,7 +24,6 @@
    1.12  #   package version
    1.13  %define       V_major 2.2
    1.14  %define       V_minor 14
    1.15 -%define       V_mucon 0.8
    1.16  
    1.17  #   package information
    1.18  Name:         jabberd
    1.19 @@ -37,32 +36,24 @@
    1.20  Group:        InstantMessaging
    1.21  License:      JOSL/GPL
    1.22  Version:      %{V_major}.%{V_minor}
    1.23 -Release:      20110914
    1.24 +Release:      20110602
    1.25  
    1.26  #   package options
    1.27 -%option       with_mucon  yes
    1.28 -%option       with_sqlite yes
    1.29 +%option       with_sqlite no
    1.30  %option       with_mysql  no
    1.31  %option       with_pgsql  no
    1.32  %option       with_pam    no
    1.33  
    1.34  #   list of sources
    1.35  Source0:      http://codex.xiaoka.com/pub/jabberd2/releases/jabberd-%{version}.tar.gz
    1.36 -Source1:      http://download.gna.org/mu-conference/mu-conference_%{V_mucon}.tar.gz
    1.37 -Source2:      rc.jabberd
    1.38 +Source1:      rc.jabberd
    1.39  Patch0:       jabberd.patch
    1.40  
    1.41  #   build information
    1.42 -Prefix:       %{l_prefix}
    1.43 -BuildRoot:    %{l_buildroot}
    1.44 -BuildPreReq:  OpenPKG, openpkg >= 20060823, make
    1.45 -PreReq:       OpenPKG, openpkg >= 20060823, perl
    1.46 +BuildPreReq:  OpenPKG, openpkg >= 20100101, make
    1.47 +PreReq:       OpenPKG, openpkg >= 20100101, perl
    1.48  BuildPreReq:  db, expat, libiconv, libidn, gpg-error, gcrypt, libgsasl, openssl, udns
    1.49  PreReq:       db, expat, libiconv, libidn, gpg-error, gcrypt, libgsasl, openssl, udns
    1.50 -%if "%{with_mucon}" == "yes"
    1.51 -BuildPreReq:  glib2
    1.52 -PreReq:       glib2
    1.53 -%endif
    1.54  %if "%{with_sqlite}" == "yes"
    1.55  BuildPreReq:  sqlite
    1.56  PreReq:       sqlite
    1.57 @@ -79,8 +70,6 @@
    1.58  BuildPreReq:  PAM
    1.59  PreReq:       PAM
    1.60  %endif
    1.61 -AutoReq:      no
    1.62 -AutoReqProv:  no
    1.63  
    1.64  %description
    1.65      JabberD is the original server implementation for the Jabber instant
    1.66 @@ -95,43 +84,18 @@
    1.67          url       = http://codex.xiaoka.com/pub/jabberd2/releases/
    1.68          regex     = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.gz
    1.69      }
    1.70 -    prog jabberd:mucon = {
    1.71 -        version   = %{V_mucon}
    1.72 -        url       = http://download.gna.org/mu-conference/
    1.73 -        regex     = mu-conference_(__VER__)\.tar\.gz
    1.74 -    }
    1.75  
    1.76  %prep
    1.77      %setup -q -n jabberd-%{version}
    1.78 -    %setup -q -D -T -a 1
    1.79      %{l_sed} <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b
    1.80      %{l_shtool} subst \
    1.81          -e 's;exec perl;exec %{l_prefix}/bin/perl;' \
    1.82          tools/jabberd.in
    1.83 -%if "%{with_mucon}" == "yes"
    1.84 -    %{l_shtool} subst \
    1.85 -        -e 's;^\(CFLAGS\ *:=.*pkg-config --cflags glib-2.0\);\1 libidn;' \
    1.86 -        -e 's;^\(LIBS\ *:=.*\);\1 $(LOCLIBS);' \
    1.87 -        mu-conference_%{V_mucon}/src/Makefile
    1.88 -    %{l_shtool} subst \
    1.89 -        -e 's;mu-conference.log;muc.log;g' \
    1.90 -        mu-conference_%{V_mucon}/src/jcomp/jcr_log.c
    1.91 -    %{l_shtool} subst \
    1.92 -        -e 's;<port>[0-9][0-9]*</port>;<port>5347</port>;' \
    1.93 -        -e 's;<spool>.*</spool>;<spool>%{l_prefix}/var/jabberd/spool/rooms</spool>;' \
    1.94 -        -e 's;<logdir>\./syslogs</logdir>;<logdir>%{l_prefix}/var/jabberd/log</logdir>;' \
    1.95 -        -e 's;<logdir>\./logs/</logdir>;<logdir>%{l_prefix}/var/jabberd/spool/logs</logdir>;' \
    1.96 -        -e 's;<pidfile>.*</pidfile>;<pidfile>%{l_prefix}/var/jabberd/pid/muc.pid</pidfile>;' \
    1.97 -        -e 's;<URL>.*</URL>;<URL>http://name.host.tld/</URL>;' \
    1.98 -        -e 's;<stylesheet>.*</stylesheet>;<stylesheet>%{l_prefix}/share/jabberd/style.css</stylesheet>;' \
    1.99 -        mu-conference_%{V_mucon}/muc-default.xml
   1.100 -    echo \
   1.101 -        'muc         @sysconfdir@/muc.xml' \
   1.102 -        >>etc/jabberd.cfg.dist.in
   1.103 -%endif
   1.104  
   1.105  %build
   1.106      #   configure program
   1.107 +    ( echo "ac_cv_func_kqueue=no"
   1.108 +    ) >config.cache
   1.109      export CC="%{l_cc}"
   1.110      export CFLAGS="%{l_cflags -O}"
   1.111      export CPPFLAGS="%{l_cppflags libidn}"
   1.112 @@ -151,6 +115,7 @@
   1.113      CPPFLAGS="$CPPFLAGS %{l_cppflags postgresql}"
   1.114  %endif
   1.115      ./configure \
   1.116 +        --cache-file=./config.cache \
   1.117          --prefix=%{l_prefix} \
   1.118          --sysconfdir=%{l_prefix}/etc/jabberd \
   1.119          --mandir=%{l_prefix}/man \
   1.120 @@ -158,7 +123,6 @@
   1.121          --enable-fs \
   1.122          --enable-pipe \
   1.123          --enable-ssl \
   1.124 -        --enable-debug \
   1.125          --with-sasl=gsasl \
   1.126  %if "%{with_sqlite}" == "yes"
   1.127          --enable-sqlite \
   1.128 @@ -185,23 +149,10 @@
   1.129          --enable-shared
   1.130  
   1.131      #   build program
   1.132 -    %{l_make} %{l_mflags -O}
   1.133 -
   1.134 -%if "%{with_mucon}" == "yes"
   1.135 -    loclibs=''
   1.136 -    case "%{l_platform -t}" in
   1.137 -        *-sunos* )
   1.138 -            loclibs='-lsocket -lnsl'
   1.139 -            ;;
   1.140 -    esac
   1.141 -    ( cd mu-conference_%{V_mucon}
   1.142 -      %{l_make} %{l_mflags -O} LOCLIBS=$loclibs
   1.143 -    ) || exit $?
   1.144 -%endif
   1.145 +    %{l_make} %{l_mflags}
   1.146  
   1.147  %install
   1.148      #   create installation filesystem structure
   1.149 -    rm -rf $RPM_BUILD_ROOT
   1.150      %{l_shtool} mkdir -f -p -m 755 \
   1.151          $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \
   1.152          $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd \
   1.153 @@ -211,29 +162,9 @@
   1.154          $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/pid \
   1.155          $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/log
   1.156  
   1.157 -    #   install required components
   1.158 +    #   install components
   1.159      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
   1.160  
   1.161 -    #   install optional components
   1.162 -%if "%{with_mucon}" == "yes"
   1.163 -    %{l_shtool} mkdir -f -p -m 755 \
   1.164 -        $RPM_BUILD_ROOT%{l_prefix}/share/jabberd \
   1.165 -        $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/logs \
   1.166 -        $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/rooms
   1.167 -    %{l_shtool} install -c -m 644 \
   1.168 -        mu-conference_%{V_mucon}/muc-default.xml \
   1.169 -        $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/muc.xml
   1.170 -    %{l_shtool} install -c \
   1.171 -        mu-conference_%{V_mucon}/src/mu-conference \
   1.172 -        $RPM_BUILD_ROOT%{l_prefix}/bin/
   1.173 -    %{l_shtool} install -c \
   1.174 -        mu-conference_%{V_mucon}/style.css \
   1.175 -        $RPM_BUILD_ROOT%{l_prefix}/share/jabberd
   1.176 -%endif
   1.177 -
   1.178 -    #   strip installation
   1.179 -    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   1.180 -
   1.181      #   remove unnecessary files
   1.182      rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/*.dist
   1.183      rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/templates/*.dist
   1.184 @@ -241,9 +172,6 @@
   1.185  
   1.186      #   install run-command script
   1.187      %{l_shtool} install -c -m 755 %{l_value -s -a} \
   1.188 -%if "%{with_mucon}" == "yes"
   1.189 -        -e 's;\(jabberd_daemons\s*=.*\)\s\s*\(\w\w*\);\1 mucon\2;' \
   1.190 -%endif
   1.191          %{SOURCE rc.jabberd} \
   1.192          $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   1.193  
   1.194 @@ -257,7 +185,6 @@
   1.195  %files -f files
   1.196  
   1.197  %clean
   1.198 -    rm -rf $RPM_BUILD_ROOT
   1.199  
   1.200  %post
   1.201      #   after upgrade, restart service

mercurial