]> git.pld-linux.org Git - SPECS.git/blob - etherpad.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / etherpad.spec
1 # TODO
2 # - check fedora progress: http://fedoraproject.org/wiki/Etherpad
3 #
4 # NOTE:
5 # tarfile created using hg:
6 # hg clone https://etherpad.googlecode.com/hg/ etherpad
7 # cd etherpad
8 # hg archive --type=tbz2 --prefix=%{name}-%{version} %{name}-%{version}-%{subver}.tar.bz2
9 %define         subver  20100429
10 %define         rel             0.1
11 Summary:        A web-based realtime collaborative document editor
12 Name:           etherpad
13 Version:        0
14 Release:        0.%{subver}%{rel}
15 License:        ASL 2.0
16 Group:          X11/Applications
17 URL:            http://code.google.com/p/etherpad/
18 Source0:        %{name}-%{version}-%{subver}.tar.bz2
19 # Source0-md5:  3dd182ec529c56f36ebcfe089389a7ac
20 Patch0:         %{name}-fix-paths.patch
21 #BuildRequires: dnsjava
22 #BuildRequires: jBCrypt
23 #BuildRequires: jakarta-commons-lang
24 #BuildRequires: java(javamail)
25 #BuildRequires: java-1.6.0-openjdk-devel >= 1:1.6.0
26 #BuildRequires: java-jcommon
27 #BuildRequires: java-jfreechart
28 #BuildRequires: jetty
29 BuildRequires:  jpackage-utils
30 #BuildRequires: mysql-connector-java >= 5.1.0
31 #BuildRequires: mysql-server
32 BuildRequires:  rpm-javaprov
33 BuildRequires:  rpmbuild(macros) >= 1.546
34 #BuildRequires: scala >= 2.7
35 #BuildRequires: tagsoup
36 #BuildRequires: tomcat6-servlet-2.5-api
37 Requires:       jpackage-utils
38 Suggests:       mysql
39 BuildArch:      noarch
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 Open source release of EtherPad, a web-based realtime collaborative
44 document editor.
45
46 %prep
47 %setup -qc
48 mv etherpad-%{version}/trunk/* .
49 %patch0 -p1
50
51 # remove backup and git files
52 find -name '.gitignore' -exec rm -f '{}' \;
53 find -name '*.orig' -exec rm -f '{}' \;
54
55 # remove bundled libs and use our own ones
56 rm -f etherpad/lib/*
57 cp -p %{_javadir}/{dnsjava,jBCrypt,jcommon,jfreechart/jfreechart}.jar etherpad/lib/
58
59 # remove as many libs as we can right now
60 rm -f infrastructure/lib/{activation,commons-lang-2.4,dnsjava-2.0.6,jetty-6.1.20,jetty-util-6.1.21,mail,servlet-api-2.5-20081211,tagsoup-1.2,yuicompressor-2.4-appjet}.jar
61 cp %{_javadir}/{activation,commons-lang,dnsjava,jetty/jetty,jetty/jetty-util,javamail/mail,tomcat6-servlet-2.5-api,tagsoup}.jar infrastructure/lib/
62 # find a way to not hardcode the jetty version number here
63 cp %{_datadir}/jetty/lib/ext/jetty-sslengine-6.1.21.jar infrastructure/lib/
64
65 # rebuild modified yuicompressor instance
66 cd infrastructure/yuicompressor && ./make.sh && cd ../../
67
68 # adjust file permissions for rpmlint
69 chmod a+x infrastructure/bin/compilecache.sh
70 chmod a-x etherpad/src/static/js/jquery-1.2.6.js
71
72 # don't attempt to use growlnotify
73 sed -i -e 's/growlnotify/echo/g' etherpad/bin/rebuildjar.sh
74
75 # make sure to use appropriate arguments
76 sed -i -e 's/${mysql}/mysql/g' etherpad/bin/setup-mysql-db.sh
77
78 %build
79 export MYSQL_CONNECTOR_JAR="%{_javadir}/mysql-connector-java.jar"
80 export JAVA_HOME="%{_prefix}/java/jdk1.7.0"
81 export SCALA_HOME="%{_datadir}/scala"
82 cd etherpad
83 ./bin/rebuildjar.sh
84
85 %install
86 rm -rf $RPM_BUILD_ROOT
87 install -d $RPM_BUILD_ROOT%{_javadir}
88 cp -p etherpad/appjet-eth-dev.jar $RPM_BUILD_ROOT%{_javadir}/etherpad.jar
89
90 install -d $RPM_BUILD_ROOT%{_bindir}
91 cp -p etherpad/bin/rebuildjar.sh $RPM_BUILD_ROOT%{_bindir}/etherpad-rebuildjar.sh
92 cp -p etherpad/bin/run-local.sh $RPM_BUILD_ROOT%{_bindir}/etherpad-run-local.sh
93 cp -p etherpad/bin/setup-mysql-db.sh $RPM_BUILD_ROOT%{_bindir}/etherpad-setup-mysql-db.sh
94
95 install -d $RPM_BUILD_ROOT%{_sysconfdir}
96 cp -p etherpad%{_sysconfdir}/etherpad.localdev-default.properties $RPM_BUILD_ROOT%{_sysconfdir}/etherpad.localdev-default.properties
97
98 # remove bundled jar files and buildcache
99 rm -rf infrastructure/lib infrastructure/build infrastructure/buildcache
100
101 # create directories for run-local script
102 install -d $RPM_BUILD_ROOT%{_localstatedir}/log/etherpad
103 install -d $RPM_BUILD_ROOT%{_localstatedir}/run/etherpad
104
105 install -d $RPM_BUILD_ROOT%{_datadir}/etherpad
106 cp -pr etherpad/src infrastructure/* $RPM_BUILD_ROOT%{_datadir}/etherpad
107
108 # remove zero lengths files
109 find $RPM_BUILD_ROOT -size 0 | xargs rm -v
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %files
115 %defattr(644,root,root,755)
116 %doc COPYING README
117 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/etherpad.localdev-default.properties
118 %attr(755,root,root) %{_bindir}/etherpad-*.sh
119 %{_datadir}/etherpad
120 %{_javadir}/etherpad.jar
121
122 %dir %{_localstatedir}/log/etherpad
123 %dir %{_localstatedir}/run/etherpad
This page took 0.77847 seconds and 3 git commands to generate.