Skip to content

Commit a24ec2b

Browse files
committed
debian: Initial work to get the Debian packaging working again
Right now it isn't working yet, but this is the way it should start working like the RPM package building is. This commit is to clean up the rules file a bit and lay the groundwork for the Debian packaging
1 parent 36e7a78 commit a24ec2b

2 files changed

Lines changed: 91 additions & 77 deletions

File tree

debian/rules

Lines changed: 29 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -16,77 +16,55 @@ export DH_VERBOSE=1
1616
# This has to be exported to make some magic below work.
1717
export DH_OPTIONS
1818

19-
20-
21-
22-
23-
2419
configure: configure-stamp
2520
configure-stamp:
2621
dh_testdir
27-
# Add here commands to configure the package.
28-
./waf configure --prefix=/usr --libdir=/usr/lib --bindir=/usr/bin --javadir=/usr/share/java --sharedstatedir=/var/lib --localstatedir=/var --sysconfdir=/etc --mandir=/usr/share/man --libexecdir=/usr/bin --with-tomcat=/usr/share/tomcat6 --tomcat-user=cloud --fast
29-
./waf showconfig
22+
cp packaging/debian/replace.properties build/replace.properties
23+
echo VERSION=$VERSION >> build/replace.properties
3024
touch configure-stamp
3125

32-
33-
#Architecture
34-
# build: build-arch build-indep
3526
build: build-arch
3627

3728
build-arch: build-arch-stamp
3829
build-arch-stamp: configure-stamp
39-
40-
# Add here commands to compile the arch part of the package.
41-
./waf build
30+
mvn package -Dsystemvm
4231
touch $@
4332

44-
# build-indep: build-indep-stamp
45-
# build-indep-stamp: configure-stamp
46-
#
47-
# # Add here commands to compile the indep part of the package.
48-
# #$(MAKE) doc
49-
# touch $@
50-
#
5133
clean:
5234
dh_testdir
5335
dh_testroot
5436
rm -f build-arch-stamp build-indep-stamp configure-stamp
55-
56-
# Add here commands to clean up after the build process.
57-
./waf distclean
58-
5937
dh_clean
6038

61-
install: install-arch
62-
# install: install-indep install-arch
63-
# install-indep:
64-
# dh_testdir
65-
# dh_testroot
66-
# dh_prep -i
67-
# dh_installdirs -i
68-
#
69-
# # Add here commands to install the indep part of the package into
70-
# # debian/<package>-doc.
71-
# #INSTALLDOC#
72-
#
73-
# dh_install -i
74-
75-
install-arch:
39+
install:
7640
dh_testdir
7741
dh_testroot
78-
dh_prep -s
42+
dh_prep -s
43+
mkdir -p debian/tmp/usr/bin
44+
mkdir -p debian/tmp/usr/share/cloud/management
45+
mkdir -p debian/tmp/var/log/cloud
46+
mkdir debian/tmp/var/log/cloud/managament
47+
mkdir debian/tmp/var/log/cloud/awsapi
48+
mkdir debian/tmp/var/log/cloud/agent
49+
mkdir debian/tmp/var/log/cloud/ipallocator
50+
mkdir debian/tmp/var/log/cloud/usage
51+
mkdir -p debian/tmp/etc/cloud
52+
mkdir debian/tmp/etc/cloud/agent
53+
mkdir debian/tmp/etc/cloud/server
54+
mkdir debian/tmp/etc/cloud/management
55+
mkdir debian/tmp/etc/cloud/usage
56+
mkdir -p debian/tmp/var/cache/cloud
57+
mkdir debian/tmp/var/cache/cloud/management
58+
mkdir -p debian/tmp/usr/share/cloud
59+
mkdir debian/tmp/usr/share/cloud/setup
60+
mkdir -p debian/tmp/usr/share/cloud/management/webapps/client
61+
62+
cp -r client/target/utilities/scripts/db/* debian/tmp/usr/share/cloud/setup/
63+
cp -r client/target/cloud-client-ui-4.1.0-SNAPSHOT/* debian/tmp/usr/share/cloud/management/webapps/client/
7964
dh_installdirs -s
80-
81-
# Add here commands to install the arch part of the package into
82-
# debian/tmp.
83-
# we put the build number again here, otherwise state checking will cause an almost-full recompile
84-
./waf install --destdir=$(CURDIR)/debian/tmp install --nochown --build-number=$(BUILDNUMBER)
85-
8665
dh_install -s
87-
# Must not depend on anything. This is to be called by
88-
# binary-arch/binary-indep
89-
# in another 'make' thread.
66+
67+
binary: binary-common
9068
binary-common:
9169
dh_testdir
9270
dh_testroot
@@ -95,39 +73,13 @@ binary-common:
9573
dh_installdocs DISCLAIMER
9674
dh_installdocs NOTICE
9775
dh_installdocs INSTALL.md
98-
# dh_installexamples
99-
# dh_installmenu
100-
# dh_installdebconf
101-
# dh_installlogrotate
102-
# dh_installemacsen
103-
# dh_installpam
104-
# dh_installmime
105-
# dh_python
106-
# dh_installinit
107-
# dh_installcron
108-
# dh_installinfo
10976
dh_installman
11077
dh_link
11178
dh_strip
11279
dh_compress
11380
dh_fixperms
114-
# dh_perl
11581
dh_makeshlibs
11682
dh_installdeb
117-
# dh_shlibdeps
11883
dh_gencontrol
11984
dh_md5sums
120-
mkdir -p ./artifacts/debs
121-
dh_builddeb --destdir=$(CURDIR)/artifacts/debs
122-
# Build architecture independant packages using the common target.
123-
# binary-indep: build-indep install-indep
124-
# $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
125-
126-
# Build architecture dependant packages using the common target.
127-
binary-arch: build-arch install-arch
128-
$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
129-
130-
# binary: binary-arch binary-indep
131-
binary: binary-arch
132-
# .PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
133-
.PHONY: build clean binary-arch binary install install-arch configure
85+
dh_builddeb
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
DBUSER=cloud
19+
DBPW=cloud
20+
DBROOTPW=
21+
MSLOG=vmops.log
22+
APISERVERLOG=api.log
23+
DBHOST=localhost
24+
MSMNTDIR=/mnt
25+
COMPONENTS-SPEC=components-premium.xml
26+
AWSAPILOG=awsapi.log
27+
REMOTEHOST=localhost
28+
AGENTCLASSPATH=
29+
AGENTLOG=/var/log/cloud/agent/agent.log
30+
AGENTLOGDIR=/var/log/cloud/agent/
31+
AGENTSYSCONFDIR=/etc/cloud/agent
32+
APISERVERLOG=/var/log/cloud/management/apilog.log
33+
AWSAPILOG=/var/log/cloud/awsapi/awsapi.log
34+
BINDIR=/usr/bin
35+
COMMONLIBDIR=/usr/share/java
36+
CONFIGUREVARS=
37+
DEPSCLASSPATH=
38+
DOCDIR=
39+
IPALOCATORLOG=/var/log/cloud/management/ipallocator.log
40+
JAVADIR=/usr/share/java
41+
LIBEXECDIR=/usr/libexec
42+
LOCKDIR=/var/lock
43+
MSCLASSPATH=
44+
MSCONF=/etc/cloud/management
45+
MSENVIRON=/usr/share/cloud/management
46+
MSLOG=/var/log/cloud/management/management-server.log
47+
MSLOGDIR=/var/log/cloud/management/
48+
MSMNTDIR=/var/lib/cloud/mnt
49+
MSUSER=cloud
50+
PIDDIR=/var/run
51+
PLUGINJAVADIR=
52+
PREMIUMJAVADIR=
53+
PYTHONDIR=/usr/lib/python2.6/site-packages/
54+
SERVERSYSCONFDIR=/etc/cloud/server
55+
SETUPDATADIR=/usr/share/cloud/setup
56+
SYSCONFDIR=/etc
57+
SYSTEMCLASSPATH=
58+
SYSTEMJARS=
59+
USAGECLASSPATH=
60+
USAGELOG=/var/log/cloud/usage
61+
USAGESYSCONFDIR=/etc/cloud/usage
62+
PACKAGE=cloud

0 commit comments

Comments
 (0)