Skip to content

RPM for Fedora/CentOS #64

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
israelshirk opened this issue Sep 30, 2014 · 0 comments
Open

RPM for Fedora/CentOS #64

israelshirk opened this issue Sep 30, 2014 · 0 comments

Comments

@israelshirk
Copy link

No wiki, so I'm stuffing it here for anyone who's googling.

Adapted from the nginx-1.4.7 specfile currently available via yumdownloader --source nginx in Fedora 20. CentOS, RHEL, Arch are probably similar.

Assumes buildroot is at ~/rpmbuild

Obtain + install virgin SRPM

yumdownloader --source nginx
rpm -iUvh <nginx source package file name>

Generate tar for the rpm build

cd ~/rpmbuild/SOURCES
git clone https://github.com/mdirolf/nginx-gridfs
cd nginx-gridfs
git submodule init
git submodule update
cd ~/rpmbuild/SOURCES
tar --exclude=.git --exclude=.gitmodules --exclude=.gitignore -czf nginx-gridfs.tgz nginx-gridfs

Patch The Spec:

cd ~/rpmbuild/SPECS
cat << THE_END | patch -p0
--- nginx.spec  2014-09-30 16:19:29.537276341 -0400
+++ nginx-new.spec  2014-09-30 16:14:48.934264847 -0400
@@ -34,6 +34,7 @@
 Source14:          nginx-upgrade.8
 Source15:          nginx.init
 Source16:          nginx.sysconfig
+Source99:          https://github.com/mdirolf/nginx-gridfs/archive/nginx-gridfs.tgz
 Source100:         index.html
 Source101:         poweredby.png
 Source102:         nginx-logo.png
@@ -82,6 +83,7 @@

 %prep
 %setup -q
+%setup -T -D -a 99
 %patch0 -p0


@@ -134,6 +136,7 @@
     --with-mail \\
     --with-mail_ssl_module \\
     --with-pcre \\
+    --add-module=nginx-gridfs \\
 %if 0%{?with_gperftools}
     --with-google_perftools_module \\
 %endif
THE_END

If you want to increment the build number, do it now in nginx.spec

Build

rpmbuild -ba nginx.spec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant