Browse code

Adding httpd and its dependencies for exposing ostree repo through web server.

Touseef Liaqat authored on 2015/05/21 07:52:15
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,56 @@
0
+Summary:    The Apache Portable Runtime Utility Library
1
+Name:       apr-util
2
+Version:    1.5.4
3
+Release:    1
4
+License:    Apache License 2.0
5
+URL:        https://apr.apache.org/
6
+Group:      System Environment/Libraries
7
+Vendor:     VMware, Inc.
8
+Distribution: Photon
9
+Source0:    http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
10
+BuildRequires:   apr
11
+BuildRequires:   openldap
12
+BuildRequires:   openssl
13
+BuildRequires:   openssl-devel
14
+BuildRequires:   nss-devel
15
+Requires:   apr
16
+Requires:   openssl
17
+Requires:   openldap
18
+Requires:   postgresql
19
+%description
20
+The Apache Portable Runtime Utility Library.
21
+
22
+%prep
23
+%setup -q
24
+%build
25
+%configure --with-apr=%{_prefix} \
26
+        --includedir=%{_includedir}/apr-%{apuver} \
27
+        --with-ldap --without-gdbm \
28
+        --with-sqlite3 --with-pgsql \
29
+        --without-sqlite2 \
30
+        --with-openssl=/usr \
31
+        --with-nss \
32
+        --with-crypto
33
+
34
+
35
+make %{?_smp_mflags}
36
+
37
+%install
38
+make DESTDIR=%{buildroot} install
39
+
40
+%clean
41
+rm -rf $RPM_BUILD_ROOT
42
+
43
+%post -p /sbin/ldconfig
44
+
45
+%postun -p /sbin/ldconfig
46
+
47
+%files
48
+%defattr(-,root,root)
49
+/usr/lib/*
50
+/usr/bin/*
51
+/usr/include/*
52
+
53
+%changelog
54
+*   Wed May 20 2015 Touseef Liaqat <tliaqat@vmware.com> 1.5.2-1
55
+-   Initial build. First version
0 56
new file mode 100644
... ...
@@ -0,0 +1,38 @@
0
+Summary:    The Apache Portable Runtime
1
+Name:       apr
2
+Version:    1.5.2
3
+Release:    1
4
+License:    Apache License 2.0
5
+URL:        https://apr.apache.org/
6
+Group:      System Environment/Libraries
7
+Vendor:     VMware, Inc.
8
+Distribution: Photon
9
+Source0:    http://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
10
+%description
11
+The Apache Portable Runtime.
12
+
13
+%prep
14
+%setup -q
15
+%build
16
+./configure --prefix=/usr \
17
+        --includedir=%{_includedir}/apr-%{aprver} \
18
+        --with-installbuilddir=%{_libdir}/apr/build-%{aprver} \
19
+        --with-devrandom=/dev/urandom \
20
+        CC=gcc CXX=g++
21
+
22
+make %{?_smp_mflags}
23
+
24
+%install
25
+make DESTDIR=%{buildroot} install
26
+
27
+%post
28
+
29
+%files
30
+%defattr(-,root,root)
31
+/usr/lib/*
32
+/usr/bin/*
33
+/usr/include/*
34
+
35
+%changelog
36
+*   Wed May 20 2015 Touseef Liaqat <tliaqat@vmware.com> 1.5.2-1
37
+-   Initial build. First version
0 38
new file mode 100644
... ...
@@ -0,0 +1,74 @@
0
+Summary:    The Apache HTTP Server
1
+Name:       httpd
2
+Version:    2.4.12
3
+Release:    1
4
+License:    Apache License 2.0
5
+URL:        http://httpd.apache.org/
6
+Group:      Applications/System
7
+Vendor:     VMware, Inc.
8
+Distribution: Photon
9
+Source0:        http://archive.apache.org/dist/httpd/httpd-2.4.12.tar.bz2
10
+BuildRequires: openssl
11
+BuildRequires: openssl-devel
12
+BuildRequires: pcre-devel
13
+BuildRequires: apr
14
+BuildRequires: apr-util
15
+Requires:   pcre
16
+Requires:   apr-util
17
+Requires:   openssl
18
+%description
19
+The Apache HTTP Server.
20
+
21
+%prep
22
+%setup -q
23
+%build
24
+./configure --enable-authnz-fcgi                            \
25
+            --enable-mods-shared="all cgi"                  \
26
+            --enable-mpms-shared=all                        \
27
+            --enable-suexec=shared                          \
28
+            --with-apr=%{_prefix}                           \
29
+            --with-apr-util=%{_prefix}                      \
30
+            --with-suexec-bin=/usr/lib/httpd/suexec         \
31
+            --with-suexec-caller=apache                     \
32
+            --with-suexec-docroot=/srv/www                  \
33
+            --with-suexec-logfile=/var/log/httpd/suexec.log \
34
+            --with-suexec-uidmin=100                        \
35
+            --with-suexec-userdir=public_html               &&
36
+
37
+make %{?_smp_mflags}
38
+
39
+%install
40
+make DESTDIR=%{buildroot} install &&
41
+
42
+
43
+%post
44
+/sbin/ldconfig
45
+if ! getent group apache >/dev/null; then
46
+    groupadd -g 25 apache
47
+fi
48
+if ! getent passwd apache >/dev/null; then
49
+    useradd -c "Apache Server" -d /srv/www -g apache \
50
+        -s /bin/false -u 25 apache
51
+fi
52
+
53
+mv -v /usr/sbin/suexec /usr/lib/httpd/suexec
54
+chgrp apache           /usr/lib/httpd/suexec &&
55
+chmod 4754             /usr/lib/httpd/suexec &&
56
+chown -v -R apache:apache /srv/www
57
+
58
+%postun
59
+/sbin/ldconfig
60
+if getent passwd apache >/dev/null; then
61
+    userdel apache
62
+fi
63
+if getent group apache >/dev/null; then
64
+    groupdel apache
65
+fi
66
+
67
+%files
68
+%defattr(-,root,root)
69
+/usr/local/*
70
+
71
+%changelog
72
+*   Wed May 20 2015 Touseef Liaqat <tliaqat@vmware.com> 2.4.12-1
73
+-   Initial build. First version