forked from neymanna/fusionforge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.rh
135 lines (113 loc) · 6.91 KB
/
Makefile.rh
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#! /usr/bin/make -f
list:
@echo ======================================================================================
@echo '= Available target are listed below ='
@echo '= Today only to build rpm packages and tarballs ='
@echo ======================================================================================
@cat Makefile.rh | grep '^.*:.*#$$' | sed 's/^\(.*:\).*#\(.*\)#$$/\1 \2/'
#Do it all
all: fusionforge allplugins dist # Build fusionforge and plugins #
clean: cleanff cleanplugins # Clean fusionforge and plugins #
#GForge
fusionforge: cleanff build # Build fusionforge #
#Plugins
#allplugins: cvsplugin cvstrackerplugin ldapextauthplugin
allplugins: cvsplugin
#cleanplugins: cleancvs cleansvn cleancvstracker cleanldapextauth cleanexternalsearch
cleanplugins: cleancvs
cvsplugin: cleancvs buildcvs # package cvs plugin #
#svnplugin: cleansvn buildsvn # package svn plugin #
#cvstrackerplugin: cleancvstracker buildcvstracker # package cvstracker plugin #
#ldapextauthplugin: cleanldapextauth buildldapextauth # package ldapextauth plugin #
#externalsearchplugin: cleanexternalsearch buildexternalsearch # package externalsearch plugin #
RPM_TMP=/tmp/fusionforge-build
# build a custom rpmmacro file and rpmrc to point to it for rpmbuild
rpmrc:
echo 'include: /usr/lib/rpm/rpmrc' > ./rpmrc
rpmmacro:
echo '$(shell rpmbuild --showrc | grep '^macrofiles'):./rpmmacros' >> ./rpmrc
echo '%_topdir $(RPM_TMP)' > ./rpmmacros
echo '%_rpmtopdir %{_topdir}' >> ./rpmmacros
echo '%_builddir %{_rpmtopdir}/BUILD' >> ./rpmmacros
echo '%_rpmdir %{_rpmtopdir}/RPMS' >> ./rpmmacros
echo '%_sourcedir %{_rpmtopdir}/SOURCE' >> ./rpmmacros
echo '%_specdir %{_rpmtopdir}/SPEC' >> ./rpmmacros
echo '%_srcrpmdir %{_rpmtopdir}/SRPMS' >> ./rpmmacros
echo '%_tmppath %{_rpmtopdir}/TMP' >> ./rpmmacros
echo '%_buildroot %{_tmppath}/%{name}-root' >> ./rpmmacros
rpmprep: rpmrc rpmmacro
-mkdir -p $(RPM_TMP)/BUILD $(RPM_TMP)/RPMS $(RPM_TMP)/SOURCE $(RPM_TMP)/SPEC $(RPM_TMP)/SRPMS $(RPM_TMP)/TMP 2> /dev/null
dist: rpmprep
-mkdir ./dist 2> /dev/null
mv ./*.bz2 $(RPM_TMP)/RPMS/noarch/*.rpm ./dist
#
# FUSIONFORGE
#
target cleanff build : override version=$(shell grep '^Version:' gforge/gforge.spec | sed 's/.*:\s*\(.*\)/\1/')
cleanff: # Clean files of fusionforge build #
@rm -rf fusionforge-$(version).tar.bz2 fusionforge-$(version)
@echo cleanff Done
build: rpmprep # Build rpm fusionforge packages #
cd gforge ;mv plugins ../;find . -type f | grep -v '/CVS/' | grep -v '/.svn/' | grep -v contrib | grep -v debian | grep -v docs/phpdoc/docs | cpio -pdumvB ../fusionforge-$(version)
cp gforge/rpm-specific/patches/gforge-4.0-deb_rpm.patch .
tar cvjf fusionforge-$(version).tar.bz2 fusionforge-$(version)
rpmbuild -ta --rcfile rpmrc fusionforge-$(version).tar.bz2
#
# CVS PLUGIN
#
target cleancvs buildcvs : override version=$(shell grep '^Version:' plugins/scmcvs/gforge-plugin-scmcvs.spec | sed 's/.*:\s*\(.*\)/\1/')
cleancvs: # Clean files of gforge-plugin-scmcvs build #
@rm -rf fusionforge-plugin-scmcvs-$(version).tar.bz2 fusionforge-plugin-scmcvs-$(version)
@echo cleancvs Done
buildcvs: rpmprep # Build rpm fusionforge-plugin-scmcvs package #
cd plugins/scmcvs ; find . -type f | grep -v '/CVS/' | grep -v '/.svn/' | grep -v contrib | grep -v debian | cpio -pdumvB ../../fusionforge-plugin-scmcvs-$(version)
tar cvjf fusionforge-plugin-scmcvs-$(version).tar.bz2 fusionforge-plugin-scmcvs-$(version)
rpmbuild -ta --rcfile rpmrc fusionforge-plugin-scmcvs-$(version).tar.bz2
#
# SVN PLUGIN
#
#versionsvn:
#override version=$(shell grep '^Version:' gforge-plugin-scmsvn/gforge-plugin-scmsvn.spec | sed 's/.*:\s*\(.*\)/\1/')
#cleansvn: versionsvn # Clean files of gforge-plugin-scmcvs build #
# @rm -rf gforge-plugin-scmsvn-$(version).tar.bz2 gforge-plugin-scmsvn-$(version)
# @echo cleansvn Done
#buildsvn: rpmprep versionsvn # Build rpm gforge-plugin-scmsvn package #
# cd gforge-plugin-scmsvn ; find . -type f | grep -v '/CVS/' | grep -v contrib | cpio -pdumvB ../gforge-plugin-scmsvn-$(version)
# tar cvzf gforge-plugin-scmsvn-$(version).tar.bz2 gforge-plugin-scmsvn-$(version)
# rpmbuild -ta --rcfile rpmrc gforge-plugin-scmsvn-$(version).tar.bz2
#
# CVSTRACKER PLUGIN
#
#versioncvstracker:
#override version=$(shell grep '^Version:' gforge-plugin-cvstracker/gforge-plugin-cvstracker.spec | sed 's/.*:\s*\(.*\)/\1/')
#cleancvstracker: versioncvstracker # Clean files of gforge-plugin-cvstracker build #
# @rm -rf gforge-plugin-cvstracker-$(version).tar.bz2 gforge-plugin-cvstracker-$(version)
# @echo cleantracker Done
#buildcvstracker: rpmprep versioncvstracker # Build rpm gforge-plugin-cvstracker package #
# cd gforge-plugin-cvstracker ; find . -type f | grep -v '/CVS/' | grep -v contrib | grep -v debian | cpio -pdumvB ../gforge-plugin-cvstracker-$(version)
# tar cvzf gforge-plugin-cvstracker-$(version).tar.bz2 gforge-plugin-cvstracker-$(version)
# rpmbuild -ta --rcfile rpmrc gforge-plugin-cvstracker-$(version).tar.bz2
#
# LDAPAUTH PLUGIN
#
#versionldapextauth:
#override version=$(shell grep '^Version:' gforge-plugin-ldapextauth/gforge-plugin-ldapextauth.spec | sed 's/.*:\s*\(.*\)/\1/')
#cleanldapextauth: versionldapextauth # Clean files of gforge-plugin-ldapextauth build #
# @rm -rf gforge-plugin-ldapextauth-$(version).tar.bz2 gforge-plugin-ldapextauth-$(version)
# @echo cleanldapextauth Done
#buildldapextauth: rpmprep versionldapextauth # Build rpm gforge-plugin-ldapextauth package #
# cd gforge-plugin-ldapextauth ; find . -type f | grep -v '/CVS/' | grep -v contrib | grep -v debian | cpio -pdumvB ../gforge-plugin-ldapextauth-$(version)
# tar cvzf gforge-plugin-ldapextauth-$(version).tar.bz2 gforge-plugin-ldapextauth-$(version)
# rpmbuild -ta --rcfile rpmrc gforge-plugin-ldapextauth-$(version).tar.bz2
#
# EXTERNALSEARCH PLUGIN
#
#versionexternalsearch:
#override version=$(shell grep '^Version:' gforge-plugin-externalsearch/gforge-plugin-externalsearch.spec | sed 's/.*:\s*\(.*\)/\1/')
#cleanexternalsearch: versionexternalsearch # Clean files of gforge-plugin-externalsearch build #
# @rm -rf gforge-plugin-externalsearch-$(version).tar.bz2 gforge-plugin-externalsearch-$(version)
# @echo cleanexternalsearch Done
#buildexternalsearch: rpmprep versionexternalsearch # Build rpm gforge-plugin-externalsearch package #
# cd gforge-plugin-externalsearch ; find . -type f | grep -v '/CVS/' | grep -v contrib | grep -v debian | cpio -pdumvB ../gforge-plugin-externalsearch-$(version)
# tar cvzf gforge-plugin-externalsearch-$(version).tar.bz2 gforge-plugin-externalsearch-$(version)
# rpmbuild -ta --rcfile rpmrc gforge-plugin-externalsearch-$(version).tar.bz2