Thu, 04 Oct 2012 20:30:05 +0200
Correct out of date build configuration, porting to Solaris 11 network
link infrastructure and new libpcap logic. This additionally allows for
device drivers in subdirectories of /dev. Correct packaged nmap
personalities and signatures to work out of the box. Finally, hack
arpd logic to properly close sockets and quit on TERM by repeating
signaling in the run command script. Sadly, all this fails to correct
the run time behaviour of honeyd which fails to bind to the IP layer.
michael@513 | 1 | ## |
michael@513 | 2 | ## subversion.spec -- OpenPKG RPM Package Specification |
michael@513 | 3 | ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/> |
michael@513 | 4 | ## |
michael@513 | 5 | ## Permission to use, copy, modify, and distribute this software for |
michael@513 | 6 | ## any purpose with or without fee is hereby granted, provided that |
michael@513 | 7 | ## the above copyright notice and this permission notice appear in all |
michael@513 | 8 | ## copies. |
michael@513 | 9 | ## |
michael@513 | 10 | ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
michael@513 | 11 | ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
michael@513 | 12 | ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
michael@513 | 13 | ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
michael@513 | 14 | ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
michael@513 | 15 | ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
michael@513 | 16 | ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
michael@513 | 17 | ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
michael@513 | 18 | ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
michael@513 | 19 | ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
michael@513 | 20 | ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
michael@513 | 21 | ## SUCH DAMAGE. |
michael@513 | 22 | ## |
michael@513 | 23 | |
michael@513 | 24 | # package version |
michael@513 | 25 | %define V_dist 1.7.5 |
michael@513 | 26 | %define V_opkg 1.7.5 |
michael@513 | 27 | %define V_book_html 20120518 |
michael@513 | 28 | %define V_book_pdf 20120518 |
michael@513 | 29 | |
michael@513 | 30 | # package information |
michael@513 | 31 | Name: subversion |
michael@513 | 32 | Summary: Subversion Source Revision Control System |
michael@513 | 33 | URL: http://subversion.apache.org/ |
michael@513 | 34 | Vendor: Apache Software Foundation |
michael@513 | 35 | Packager: OpenPKG Foundation e.V. |
michael@513 | 36 | Distribution: OpenPKG Community |
michael@513 | 37 | Class: BASE |
michael@513 | 38 | Group: SCM |
michael@513 | 39 | License: Apache/BSD |
michael@513 | 40 | Version: %{V_opkg} |
michael@514 | 41 | Release: 20120800 |
michael@513 | 42 | |
michael@513 | 43 | # package options |
michael@513 | 44 | %option with_fsl yes |
michael@513 | 45 | %option with_db no |
michael@513 | 46 | %option with_sasl no |
michael@513 | 47 | |
michael@513 | 48 | # list of sources |
michael@513 | 49 | Source0: http://www.apache.org/dist/subversion/subversion-%{V_dist}.tar.bz2 |
michael@513 | 50 | Source1: http://download.openpkg.org/components/versioned/subversion/svn-book-%{V_book_html}.html |
michael@513 | 51 | Source2: http://download.openpkg.org/components/versioned/subversion/svn-book-%{V_book_pdf}.pdf |
michael@513 | 52 | Source3: subversion.config |
michael@513 | 53 | Source4: subversion.servers |
michael@513 | 54 | Source5: rc.subversion |
michael@513 | 55 | Source6: fsl.subversion |
michael@513 | 56 | Patch0: subversion.patch |
michael@513 | 57 | |
michael@513 | 58 | # build information |
michael@513 | 59 | BuildPreReq: OpenPKG, openpkg >= 20100101, make, libtool, sed, pkgconfig |
michael@513 | 60 | PreReq: OpenPKG, openpkg >= 20100101 |
michael@513 | 61 | BuildPreReq: diffutils, openssl, zlib, libiconv, expat, serf, neon, apr, sqlite |
michael@513 | 62 | PreReq: diffutils, openssl, zlib, libiconv, expat, serf, neon, apr, sqlite |
michael@513 | 63 | %if "%{with_fsl}" == "yes" |
michael@513 | 64 | BuildPreReq: fsl |
michael@513 | 65 | PreReq: fsl |
michael@513 | 66 | %endif |
michael@513 | 67 | %if "%{with_db}" == "yes" |
michael@513 | 68 | BuildPreReq: db |
michael@513 | 69 | PreReq: db |
michael@513 | 70 | %endif |
michael@513 | 71 | %if "%{with_sasl}" == "yes" |
michael@513 | 72 | BuildPreReq: sasl |
michael@513 | 73 | PreReq: sasl |
michael@513 | 74 | %endif |
michael@513 | 75 | |
michael@513 | 76 | %description |
michael@513 | 77 | Subversion is a modern Version Control System (VCS) providing most |
michael@513 | 78 | current CVS features, versioned directories/renames/meta-data, |
michael@513 | 79 | atomic commits, cheap branching and tagging, native client/server |
michael@513 | 80 | architecture, and the choice of database or plain-file repository |
michael@513 | 81 | implementations. |
michael@513 | 82 | |
michael@513 | 83 | %track |
michael@513 | 84 | prog subversion = { |
michael@513 | 85 | version = %{V_dist} |
michael@513 | 86 | url = http://subversion.apache.org/download/ |
michael@513 | 87 | regex = subversion-(\d+\.\d+.\d+)\.tar\.bz2 |
michael@513 | 88 | } |
michael@513 | 89 | |
michael@513 | 90 | %prep |
michael@513 | 91 | %setup -q |
michael@513 | 92 | %patch -p0 |
michael@513 | 93 | |
michael@513 | 94 | # patch: correctly pass --disable-shared to sub-directories |
michael@513 | 95 | %{l_shtool} subst \ |
michael@514 | 96 | -e 's;\(\$ac_abs_srcdir/configure \$ac_configure_args\);\1 --disable-shared;' \ |
michael@513 | 97 | configure |
michael@513 | 98 | |
michael@513 | 99 | # patch: adjust path to configuration directory |
michael@513 | 100 | %{l_shtool} subst \ |
michael@513 | 101 | -e 's;/etc/subversion;%{l_prefix}/etc/subversion;g' \ |
michael@513 | 102 | subversion/libsvn_subr/config_impl.h \ |
michael@513 | 103 | subversion/libsvn_subr/config_file.c |
michael@513 | 104 | |
michael@513 | 105 | %build |
michael@513 | 106 | # configure package |
michael@513 | 107 | CC="%{l_cc}" \ |
michael@513 | 108 | CFLAGS="%{l_cflags -O}" \ |
michael@513 | 109 | CPPFLAGS="%{l_cppflags libxml2 .} -DSQLITE_THREADSAFE=1" \ |
michael@513 | 110 | %if "%{with_sasl}" == "yes" && "%{with_db}" == "yes" |
michael@655 | 111 | LDFLAGS="%{l_ldflags} `pkg-config --libs-only-L db sasl sqlite3` %{l_fsl_ldflags}" \ |
michael@655 | 112 | LIBS="`pkg-config --libs-only-l db sasl sqlite3` -lz %{l_fsl_libs}" \ |
michael@513 | 113 | %else |
michael@513 | 114 | %if "%{with_sasl}" == "yes" |
michael@655 | 115 | LDFLAGS="%{l_ldflags} `pkg-config --libs-only-L sasl sqlite3` %{l_fsl_ldflags}" \ |
michael@655 | 116 | LIBS="`pkg-config --libs-only-l sasl apr-util-1 sqlite3` -lz %{l_fsl_libs}" \ |
michael@513 | 117 | %else |
michael@513 | 118 | LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \ |
michael@655 | 119 | LIBS="`pkg-config --libs-only-l apr-util-1 sqlite3` -lz %{l_fsl_libs}" \ |
michael@513 | 120 | %endif |
michael@513 | 121 | %endif |
michael@513 | 122 | CONFIG_SHELL="%{l_bash}" \ |
michael@513 | 123 | ./configure \ |
michael@513 | 124 | --prefix=%{l_prefix} \ |
michael@513 | 125 | --mandir=%{l_prefix}/man \ |
michael@513 | 126 | %if "%{with_db}" == "yes" |
michael@513 | 127 | --with-berkeley-db="db.h:%{l_prefix}/include:%{l_prefix}/lib:db" \ |
michael@513 | 128 | %else |
michael@513 | 129 | --without-berkeley-db \ |
michael@513 | 130 | %endif |
michael@513 | 131 | --with-sqlite=%{l_prefix} \ |
michael@513 | 132 | --with-ssl=openssl \ |
michael@513 | 133 | --with-zlib=%{l_prefix} \ |
michael@513 | 134 | --with-apr=%{l_prefix} \ |
michael@513 | 135 | --with-apr-util=%{l_prefix} \ |
michael@513 | 136 | --with-neon=%{l_prefix} \ |
michael@513 | 137 | --with-serf=%{l_prefix} \ |
michael@513 | 138 | %if "%{with_sasl}" == "yes" |
michael@513 | 139 | --with-sasl \ |
michael@513 | 140 | %else |
michael@513 | 141 | --without-sasl \ |
michael@513 | 142 | %endif |
michael@513 | 143 | --without-gssapi \ |
michael@513 | 144 | --without-apxs \ |
michael@513 | 145 | --disable-nls \ |
michael@513 | 146 | --disable-shared \ |
michael@513 | 147 | --enable-static |
michael@513 | 148 | |
michael@513 | 149 | # build package |
michael@514 | 150 | %{l_make} %{l_mflags -O} |
michael@513 | 151 | |
michael@513 | 152 | %install |
michael@513 | 153 | # install package |
michael@513 | 154 | %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT |
michael@513 | 155 | |
michael@513 | 156 | # strip down installation |
michael@513 | 157 | rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.exp |
michael@513 | 158 | rm -f $RPM_BUILD_ROOT%{l_prefix}/include/subversion-1/svn-revision.txt |
michael@513 | 159 | rm -f $RPM_BUILD_ROOT%{l_prefix}/include/subversion-1/mod_dav_svn.h |
michael@513 | 160 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/doc |
michael@513 | 161 | rm -rf $RPM_BUILD_ROOT%{l_prefix}/build-1 |
michael@513 | 162 | strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true |
michael@513 | 163 | |
michael@513 | 164 | # install Subversion default global configuration files |
michael@513 | 165 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@513 | 166 | $RPM_BUILD_ROOT%{l_prefix}/etc/subversion |
michael@513 | 167 | %{l_shtool} install -c -m 644 %{l_value -s -a} \ |
michael@513 | 168 | %{SOURCE subversion.config} \ |
michael@513 | 169 | $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/config |
michael@513 | 170 | %{l_shtool} install -c -m 644 \ |
michael@513 | 171 | %{SOURCE subversion.servers} \ |
michael@513 | 172 | $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/servers |
michael@513 | 173 | |
michael@513 | 174 | # install Subversion Bash command completion |
michael@513 | 175 | %{l_shtool} install -c -m 644 \ |
michael@513 | 176 | tools/client-side/bash_completion \ |
michael@513 | 177 | $RPM_BUILD_ROOT%{l_prefix}/etc/subversion/bashrc |
michael@513 | 178 | |
michael@513 | 179 | # install Subversion book |
michael@513 | 180 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@513 | 181 | $RPM_BUILD_ROOT%{l_prefix}/share/subversion |
michael@513 | 182 | %{l_shtool} install -c -m 644 \ |
michael@513 | 183 | %{SOURCE svn-book-%{V_book_pdf}.pdf} \ |
michael@513 | 184 | $RPM_BUILD_ROOT%{l_prefix}/share/subversion/svn-book.pdf |
michael@513 | 185 | %{l_shtool} install -c -m 644 \ |
michael@513 | 186 | %{SOURCE svn-book-%{V_book_html}.html} \ |
michael@513 | 187 | $RPM_BUILD_ROOT%{l_prefix}/share/subversion/svn-book.html |
michael@513 | 188 | |
michael@513 | 189 | # install run-command script |
michael@513 | 190 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@513 | 191 | $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d |
michael@513 | 192 | %{l_shtool} install -c -m 755 %{l_value -s -a} \ |
michael@513 | 193 | %{SOURCE rc.subversion} \ |
michael@513 | 194 | $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
michael@513 | 195 | |
michael@513 | 196 | # install OSSP fsl configuration |
michael@513 | 197 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@513 | 198 | $RPM_BUILD_ROOT%{l_prefix}/etc/fsl |
michael@513 | 199 | %{l_shtool} install -c -m 644 %{l_value -s -a} \ |
michael@513 | 200 | %{SOURCE fsl.subversion} \ |
michael@513 | 201 | $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ |
michael@513 | 202 | |
michael@513 | 203 | # create directory for default repository and svnserve pidfile |
michael@513 | 204 | %{l_shtool} mkdir -f -p -m 755 \ |
michael@513 | 205 | $RPM_BUILD_ROOT%{l_prefix}/var/subversion |
michael@513 | 206 | |
michael@513 | 207 | # determine installation files |
michael@513 | 208 | %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
michael@513 | 209 | %{l_files_std} \ |
michael@513 | 210 | '%config %{l_prefix}/etc/subversion/*' \ |
michael@513 | 211 | '%config %{l_prefix}/etc/fsl/fsl.subversion' \ |
michael@513 | 212 | '%attr(-,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/subversion' \ |
michael@513 | 213 | '%doc %{l_prefix}/share/subversion/svn-book.*' |
michael@513 | 214 | |
michael@513 | 215 | %files -f files |
michael@513 | 216 | |
michael@513 | 217 | %clean |
michael@513 | 218 | |
michael@513 | 219 | %post |
michael@513 | 220 | # create default repository |
michael@513 | 221 | if [ ! -d $RPM_INSTALL_PREFIX/var/subversion/default ]; then |
michael@513 | 222 | su - %{l_rusr} -c \ |
michael@513 | 223 | "$RPM_INSTALL_PREFIX/bin/svnadmin create \ |
michael@513 | 224 | $RPM_INSTALL_PREFIX/var/subversion/default" |
michael@513 | 225 | fi |
michael@513 | 226 | |
michael@513 | 227 | # after upgrade, restart service |
michael@513 | 228 | [ $1 -eq 2 ] || exit 0 |
michael@513 | 229 | eval `%{l_rc} subversion status 2>/dev/null` |
michael@513 | 230 | [ ".$subversion_active" = .yes ] && %{l_rc} subversion restart |
michael@513 | 231 | exit 0 |
michael@513 | 232 | |
michael@513 | 233 | %preun |
michael@513 | 234 | # before erase, stop service |
michael@513 | 235 | [ $1 -eq 0 ] || exit 0 |
michael@513 | 236 | %{l_rc} subversion stop 2>/dev/null |
michael@513 | 237 | exit 0 |
michael@513 | 238 |