/[smecontribs]/rpms/phpki/contribs7/phpki.spec
ViewVC logotype

Contents of /rpms/phpki/contribs7/phpki.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Mar 2 23:38:37 2009 UTC (15 years, 2 months ago) by slords
Branch: MAIN
Initial import of phpki

1 %define name phpki
2 %define version 0.82
3 %define release 7
4 Summary: Phpki is a simple certificate management suite
5 Name: %{name}
6 Version: %{version}
7 Release: %{release}%{?dist}
8 Distribution: SME Server
9 License: GNU GPL version 2
10 URL: http://sourceforge.net/projects/phpki/
11 Group: SMEserver/addon
12 #wget http://www.fooweb.com/downloads/foo-3.6.431.tar.gz
13 Source: phpki-0.82.tar.gz
14 Patch1: phpki-0.82-email_signing.patch
15 Patch2: phpki-0.82-sme_openvpn_bridge_compat.patch
16 Patch3: phpki-0.82-sme_admin_user.patch
17 Patch4: phpki-0.82-openvpn_static_key.patch
18 Patch5: phpki-0.82-expirey.patch
19 Patch6: phpki-0.82-dl_display_ta_dh.patch
20 Patch7: phpki-0.82-dl_crl_in_pem.patch
21 Patch8: phpki-0.82-remove_email_from_upload_file_name.patch
22 Patch9: phpki-0.82-display_root_pem.patch
23 Patch10: phpki-0.82-disable_download_after_create.patch
24 Patch11: phpki-0.82-remove_security_warning.patch
25 Patch12: phpki-0.82-remove_email_from_upload_file_name.patch2
26
27 Packager: Daniel B. <daniel@firewall-services.com>
28 BuildArch: noarch
29 BuildRoot: /var/tmp/%{name}-%{version}
30 Requires: e-smith-release >= 7.0
31 Requires: php
32 Requires: openssl
33 Requires: openvpn
34 AutoReqProv: no
35
36 %description
37 http://sourceforge.net/projects/phpki/
38 PHPki is an Open Source Web application for managing a multi-agency PKI for HIPAA compliance.
39 With it, you may create and centrally manage X.509 certificates for use with S/MIME enabled
40 e-mail clients, SSL servers, and VPN applications.
41
42 %changelog
43 * Tue Jan 20 2009 Daniel B. <daniel@firewall-services.com> [0.82-7]
44 - Don't replace config file on upgrades
45
46 * Wed Jan 07 2009 Daniel B. <daniel@firewall-services.com> [0.82-6]
47 - Remove the email address from the file name during upload (in search page)
48 - Remove secure.sh script
49
50 * Tue Dec 16 2008 Daniel B. <daniel@firewall-services.com> [0.82-5]
51 - Link index.php to setup-presetup.php
52
53 * Mon Dec 08 2008 Daniel B. <daniel@firewall-services.com> [0.82-4]
54 - Changes so certificates imported from openvpn-bridge are recognized
55 - Configure default admin user to 'admin'
56 - Create a static key for OpenVPN TLS auth (requires openvpn)
57 - Add expirey values (3 Months, 6 Months)
58 - Display or download takey.pem and dhparam1024.pem from
59 the certificate management menue
60 - Display the Root certificate in PEM format
61 - Possibility to download the CRL in PEM format
62 - Remove the email address from the file name during upload
63 - Disable download of certificate after creating a new one
64 - Remove security warning after setup
65
66 * Wed Dec 05 2008 Daniel B. <daniel@firewall-services.com> [0.82-3]
67 - Correct extension name for email_signing certificates
68 - Remove links, and recreate them in the %post section so upgrade can be done smoothly
69
70 * Wed Nov 26 2008 Daniel B. <daniel@firewall-services.com> [0.82-0]
71 - initial release
72 - builds from unchanged .tar.gz
73
74 %prep
75 %setup -c -n %{name}
76 %patch1 -p1
77 %patch2 -p1
78 %patch3 -p1
79 %patch4 -p1
80 %patch5 -p1
81 %patch6 -p1
82 %patch7 -p1
83 %patch8 -p1
84 %patch9 -p1
85 %patch10 -p1
86 %patch11 -p1
87 %patch12 -p1
88
89 %build
90 #drop in an unchanged .tgz, if required rename directory here, eg remove version number.
91 %{__mkdir_p} root/opt/phpki/html
92 %{__mkdir_p} root/opt/phpki/phpki-store
93 %{__mv} %{name}-%{version}/* root/opt/phpki/html/
94
95 # Remove links to setup page so upgrades can be done smoothly
96 %{__rm} -f root/opt/phpki/html/index.php
97 %{__rm} -f root/opt/phpki/html/ca/index.php
98 %{__rm} -f root/opt/phpki/html/setup.php
99
100 # This script shouldn't be here
101 %{__rm} -f root/opt/phpki/html/secure.sh
102
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 (cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
107 rm -f %{name}-%{version}-filelist
108 /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
109 --file '/opt/phpki/html/config.php' 'attr(660,root,phpki) %config(noreplace)' \
110 --file '/opt/phpki/html/openssl.cnf' 'attr(660,root,phpki) %config(noreplace)' \
111 --dir '/opt/phpki/html' 'attr(770,root,phpki)' \
112 --dir '/opt/phpki/html/ca' 'attr(770,root,phpki)' \
113 --dir '/opt/phpki/phpki-store' 'attr(750,phpki,phpki)' \
114 > %{name}-%{version}-filelist
115
116 %files -f %{name}-%{version}-filelist
117 %defattr(-,root,root)
118
119 %clean
120 cd ..
121 rm -rf $RPM_BUILD_ROOT
122
123 %pre
124 if ! /usr/bin/id phpki &>/dev/null; then
125 /usr/sbin/useradd -c 'Phpki User' -s /sbin/nologin -r -d /opt/phpki/phpki-store phpki &>/dev/null || \
126 %logmsg "Unexpected error adding user \"phpki\". Abort installation."
127 fi
128
129 %preun
130
131 %post
132 # First install, point index.php to setup.php
133 if [ $1 == 1 ]; then
134 %{__ln_s} /opt/phpki/html/setup.php-presetup /opt/phpki/html/index.php
135 %{__ln_s} /opt/phpki/html/setup.php-presetup /opt/phpki/html/setup.php
136 echo "<?php
137 header(\"Location: ./../index.php\");
138 ?>
139 " > /opt/phpki/html/ca/index.php
140
141 fi
142
143 %postun
144
145 true

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed