1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
Index: passenger-2.0.1/Rakefile
===================================================================
--- passenger-2.0.1.orig/Rakefile
+++ passenger-2.0.1/Rakefile
@@ -38,12 +38,8 @@ APR_FLAGS.nil? and raise "Could not find
CXX = "g++"
THREADING_FLAGS = "-D_REENTRANT"
-if OPTIMIZE
- OPTIMIZATION_FLAGS = "-O2 -DNDEBUG"
-else
- OPTIMIZATION_FLAGS = "-g -DPASSENGER_DEBUG"
-end
-CXXFLAGS = "#{THREADING_FLAGS} #{OPTIMIZATION_FLAGS} -Wall -I/usr/local/include #{MULTI_ARCH_FLAGS}"
+OPTIMIZATION_FLAGS = "#{ENV['CXXFLAGS']} -DNDEBUG"
+CXXFLAGS = "#{THREADING_FLAGS} #{OPTIMIZATION_FLAGS} -Wall #{MULTI_ARCH_FLAGS}"
LDFLAGS = ""
@@ -156,7 +152,7 @@ subdir 'ext/apache2' do
] do
create_executable "ApplicationPoolServerExecutable",
'ApplicationPoolServerExecutable.cpp System.o Utils.o Logging.o',
- "-I.. #{CXXFLAGS} #{LDFLAGS} -DPASSENGER_DEBUG ../boost/src/libboost_thread.a -lpthread"
+ "-I.. #{CXXFLAGS} #{LDFLAGS} ../boost/src/libboost_thread.a -lpthread"
end
file 'mod_passenger.o' => ['mod_passenger.c'] do
@@ -476,15 +472,15 @@ desc "Create a fakeroot, useful for buil
task :fakeroot => [:apache2, :native_support, :doc] do
require 'rbconfig'
include Config
- fakeroot = "pkg/fakeroot"
+ fakeroot = ENV['DISTDIR']
# We don't use CONFIG['archdir'] and the like because we want
# the files to be installed to /usr, and the Ruby interpreter
# on the packaging machine might be in /usr/local.
- libdir = "#{fakeroot}/usr/lib/ruby/#{CONFIG['ruby_version']}"
+ libdir = "#{fakeroot}/#{CONFIG['sitedir']}/#{CONFIG['ruby_version']}"
extdir = "#{libdir}/#{CONFIG['arch']}"
bindir = "#{fakeroot}/usr/bin"
- docdir = "#{fakeroot}/usr/share/doc/passenger"
+ docdir = "#{fakeroot}/usr/share/doc/passenger-#{PACKAGE_VERSION}"
libexecdir = "#{fakeroot}/usr/lib/passenger"
sh "rm -rf #{fakeroot}"
@@ -503,7 +499,6 @@ task :fakeroot => [:apache2, :native_sup
sh "cp bin/* #{bindir}/"
sh "mkdir -p #{libexecdir}"
- sh "cp ext/apache2/mod_passenger.so #{libexecdir}/"
sh "mv #{fakeroot}/usr/bin/passenger-spawn-server #{libexecdir}/"
sh "cp ext/apache2/ApplicationPoolServerExecutable #{libexecdir}/"
|