]> git.pld-linux.org Git - packages/cherokee.git/blobdiff - cherokee.spec
drop all Upstart hacks
[packages/cherokee.git] / cherokee.spec
index bc19c188c80086c2062284af5a1a612124b5c633..8d9ae98326b82fbec15ba9ed01b031b363f4dc67 100644 (file)
 Summary:       Fast, Flexible and Lightweight Web server
 Summary(pl.UTF-8):     Cherokee - serwer WWW
 Name:          cherokee
-Version:       1.2.101
-Release:       3
+Version:       1.2.103
+Release:       4
 License:       GPL v2
 Group:         Networking/Daemons
-Source0:       http://www.cherokee-project.com/download/1.2/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: ef47003355a2e368e4d9596cd070ef23
-Source1:       %{name}.init
-Source2:       %{name}.sysconfig
-Source3:       %{name}.upstart
+Source0:       https://github.com/cherokee/webserver/archive/v%{version}.zip
+# Source0-md5: 9e6d8e0dd95808d365d32ecb0a9b80fe
+# the last snapshot from https://github.com/cherokee/CTK
+Source1:       CTK-20120806.tar.xz
+# Source1-md5: 567f087cd6cdf10b89047535cbe94f8e
+Source2:       %{name}.init
+Source3:       %{name}.sysconfig
+Source4:       %{name}.service
 Patch0:                %{name}-config.patch
 Patch1:                %{name}-panic_path.patch
 Patch2:                ffmpeg0.11.patch
@@ -30,7 +33,7 @@ URL:          http://www.cherokee-project.com/
 BuildRequires: autoconf
 BuildRequires: automake
 %{?with_ffmpeg:BuildRequires:  ffmpeg-devel >= 1.0}
-BuildRequires: gettext-devel
+BuildRequires: gettext-tools
 BuildRequires: libtool
 %{?with_mysql:BuildRequires:   mysql-devel}
 %{?with_ldap:BuildRequires:    openldap-devel}
@@ -41,7 +44,7 @@ BuildRequires:        php(fcgi)
 BuildRequires: pkgconfig
 BuildRequires: python-docutils
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.561
+BuildRequires: rpmbuild(macros) >= 1.647
 BuildRequires: zlib-devel
 Requires(post,preun):  /sbin/chkconfig
 Requires(postun):      /usr/sbin/groupdel
@@ -52,6 +55,7 @@ Requires(pre):        /usr/sbin/groupadd
 Requires(pre): /usr/sbin/useradd
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      rc-scripts >= 0.4.3.0
+Requires:      systemd-units >= 38
 Suggests:      %{name}-admin = %{version}-%{release}
 Suggests:      php(fcgi)
 Provides:      group(cherokee)
@@ -82,19 +86,6 @@ znaków, TLS/SSL poprzez OpenSSL, hosty wirtualne, uwierzytelnianie,
 opcje związane z pamięcią podręczną, PHP, własne zarządzanie błędami i
 wiele więcej.
 
-%package upstart
-Summary:       Upstart job description for the Cherokee web server
-Summary(pl.UTF-8):     Opis zadania Upstart dla serwera Cherokee
-Group:         Daemons
-Requires:      %{name} = %{version}-%{release}
-Requires:      upstart >= 0.6
-
-%description upstart
-Upstart job description for the Cherokee web server.
-
-%description upstart -l pl.UTF-8
-Opis zadania Upstart dla serwera WWW Cherokee.
-
 %package admin
 Summary:       Cherokee web server administration interface
 Summary(pl.UTF-8):     Interfejs administracyjny serwera WWW Cherokee
@@ -133,10 +124,10 @@ Cherokee web server libraries.
 Biblioteki serwera WWW Cherokee.
 
 %prep
-%setup -q
+%setup -qn webserver-%{version} -a1
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
+#%patch2 -p1
 
 %build
 %{__libtoolize}
@@ -144,6 +135,7 @@ Biblioteki serwera WWW Cherokee.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
+po/admin/generate_POTFILESin.py > po/admin/POTFILES.in
 %configure \
        --with-php=/usr/bin/php.cgi \
        --disable-static \
@@ -156,18 +148,25 @@ Biblioteki serwera WWW Cherokee.
        %{!?with_mysql:--without-mysql} \
        %{!?with_ffmpeg:--without-ffmpeg} \
        %{!?with_ldap:--without-ldap}
+
+# workaround for missing pot file and no way to build it
+touch po/admin/cherokee.pot
+touch po/admin/*.po
+
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/etc/{init,pam.d,sysconfig,rc.d/init.d},/var/log/%{name}}
+install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,rc.d/init.d} \
+               $RPM_BUILD_ROOT/var/log/%{name} \
+               $RPM_BUILD_ROOT%{systemdunitdir}
 
 %{__make} -j1 install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/init/%{name}.conf
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/cherokee.service
 
 # users don't need this
 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
@@ -204,15 +203,19 @@ rm -rf $RPM_BUILD_ROOT
 %addusertogroup cherokee http
 
 %post
+if [ "$1" = "2" -a -e %{_sysconfdir}/cherokee.conf ]; then
+       %{_datadir}/%{name}/admin/upgrade_config.py %{_sysconfdir}/cherokee.conf
+fi
 /sbin/chkconfig --add %{name}
 %service %{name} restart "Cherokee webserver"
-exit 0
+%systemd_post %{name}.service
 
 %preun
 if [ "$1" = "0" ]; then
        %service %{name} stop
        /sbin/chkconfig --del %{name}
 fi
+%systemd_preun %{name}.service
 
 %postun
 if [ "$1" = "0" ]; then
@@ -220,25 +223,24 @@ if [ "$1" = "0" ]; then
        %groupremove cherokee
        %groupremove http
 fi
+%systemd_reload
 
-%post upstart
-%upstart_post %{name}
-
-%postun upstart
-%upstart_postun %{name}
+%triggerpostun -- %{name} < 1.2.103-1
+%systemd_trigger %{name}.service
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog html performance.conf.sample
+%doc AUTHORS html performance.conf.sample
 %dir %attr(750,root,root) %{_sysconfdir}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf
 
 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cherokee
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee
 %attr(754,root,root) /etc/rc.d/init.d/cherokee
+%{systemdunitdir}/%{name}.service
 
 %attr(755,root,root) %{_bindir}/CTK-run
 %attr(755,root,root) %{_bindir}/cget
@@ -331,10 +333,6 @@ fi
 %dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs
 %dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs/images
 
-%files upstart
-%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
-
 %files admin -f %{name}.lang
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_sbindir}/cherokee-admin
@@ -359,9 +357,9 @@ fi
 %dir %{_datadir}/cherokee/admin/wizards
 %{_datadir}/cherokee/admin/wizards/*.py
 %{_datadir}/cherokee/admin/wizards/*.pyc
-%dir %{_datadir}/cherokee/admin/market
-%{_datadir}/cherokee/admin/market/*.py
-%{_datadir}/cherokee/admin/market/*.pyc
+#%dir %{_datadir}/cherokee/admin/market
+#%{_datadir}/cherokee/admin/market/*.py
+#%{_datadir}/cherokee/admin/market/*.pyc
 %dir %{_datadir}/cherokee/admin/icons
 %{_datadir}/cherokee/admin/icons/*.png
 %{_datadir}/cherokee/admin/icons/*.svg
This page took 0.104053 seconds and 4 git commands to generate.