Commit f60ef2f140c372018dc6cd4df498ce3ed6a08dff
1 parent
8279b55d
Exists in
master
and in
79 other branches
Added noosfero repo specs
Showing
3 changed files
with
162 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,33 @@ | @@ -0,0 +1,33 @@ | ||
1 | +Name: noosfero-deps | ||
2 | +Version: 1.0 | ||
3 | +Release: 1%{?dist} | ||
4 | +Summary: Ruby dependencies for Noosfero | ||
5 | +Group: Development/Tools | ||
6 | +License: Various | ||
7 | +URL: http://noosfero.org | ||
8 | +Source0: %{name}-%{version}.tar.gz | ||
9 | + | ||
10 | +BuildRequires: make, gcc, gcc-c++, ruby, ruby-devel, rubygem-bundler, libicu-devel, cmake, mysql-devel, postgresql-devel, ImageMagick-devel | ||
11 | +Requires: ruby, rubygem-bundler | ||
12 | + | ||
13 | +%description | ||
14 | +Ruby dependencies for Noosfero. | ||
15 | +Noosfero is a web platform for social and solidarity economy networks with blog, | ||
16 | +e-Porfolios, CMS, RSS, thematic discussion, events agenda and collective | ||
17 | +inteligence for solidarity economy in the same system! Get to know, use it, | ||
18 | +participate and contribute to this free software project! | ||
19 | + | ||
20 | +%prep | ||
21 | +%autosetup | ||
22 | + | ||
23 | +%build | ||
24 | +make %{?_smp_mflags} | ||
25 | + | ||
26 | +%install | ||
27 | +%make_install | ||
28 | + | ||
29 | +%files | ||
30 | +/usr/lib/noosfero | ||
31 | +%doc | ||
32 | + | ||
33 | +%changelog |
@@ -0,0 +1,95 @@ | @@ -0,0 +1,95 @@ | ||
1 | +Name: noosfero | ||
2 | +Version: 1.0 | ||
3 | +Release: 1%{?dist} | ||
4 | +Summary: Software Development Platform | ||
5 | +Group: Development/Tools | ||
6 | +License: GNU GPLv3 | ||
7 | +URL: http://noosfero.org | ||
8 | +Source0: %{name}-%{version}.tar.gz | ||
9 | +Patch0: %{name}p0.patch | ||
10 | +BuildArch: noarch | ||
11 | +BuildRequires: noosfero-deps | ||
12 | +Requires: noosfero-deps, po4a, tango-icon-theme | ||
13 | + | ||
14 | +%description | ||
15 | +Noosfero is a web platform for social and solidarity economy networks with blog, | ||
16 | +e-Porfolios, CMS, RSS, thematic discussion, events agenda and collective | ||
17 | +inteligence for solidarity economy in the same system! Get to know, use it, | ||
18 | +participate and contribute to this free software project! | ||
19 | + | ||
20 | +%prep | ||
21 | +%setup -q | ||
22 | +grep -rl '/usr/bin/ruby1.8' . | xargs --no-run-if-empty sed -i -e '1 s|.*|#!/usr/bin/ruby|' | ||
23 | +%patch0 -p1 | ||
24 | + | ||
25 | +%build | ||
26 | + | ||
27 | +%install | ||
28 | +mkdir -p %{buildroot}/var/lib/noosfero/plugins | ||
29 | +mkdir -p %{buildroot}/var/lib/noosfero/public | ||
30 | +mkdir -p %{buildroot}/usr/lib/noosfero | ||
31 | +mv plugins %{buildroot}/var/lib/noosfero/ | ||
32 | +mv doc %{buildroot}/var/lib/noosfero/ | ||
33 | +mv public %{buildroot}/var/lib/noosfero/ | ||
34 | +rm Gemfile Vagrantfile *.md gitignore.example | ||
35 | +cp -r . %{buildroot}/usr/lib/noosfero/ | ||
36 | + | ||
37 | + | ||
38 | +%post | ||
39 | +groupadd noosfero || true | ||
40 | +if ! id noosfero; then | ||
41 | + adduser noosfero --system -g noosfero --shell /bin/sh --home-dir /usr/lib/noosfero | ||
42 | +fi | ||
43 | + | ||
44 | +cp /usr/lib/noosfero/etc/init.d/noosfero /etc/init.d/ | ||
45 | +/etc/init.d/noosfero setup | ||
46 | + | ||
47 | +mkdir -p /var/lib/noosfero/locale | ||
48 | +mkdir -p /etc/noosfero | ||
49 | + | ||
50 | +chown -R noosfero:noosfero /var/lib/noosfero | ||
51 | + | ||
52 | +ln -s /var/lib/noosfero/locale /usr/lib/noosfero/locale | ||
53 | +ln -s /var/lib/noosfero/plugins /usr/lib/noosfero/plugins | ||
54 | +ln -s /var/lib/noosfero/doc /usr/lib/noosfero/doc | ||
55 | +ln -s /var/lib/noosfero/public /usr/lib/noosfero/public | ||
56 | + | ||
57 | +ln -s /etc/noosfero/database.yml /usr/lib/noosfero/config/ | ||
58 | +ln -s /etc/noosfero/thin.yml /usr/lib/noosfero/config/ | ||
59 | + | ||
60 | +cd /usr/lib/noosfero/ | ||
61 | +bundle exec thin -C /etc/noosfero/thin.yml -e production config | ||
62 | + | ||
63 | +cat > /etc/noosfero/database.yml <<EOF | ||
64 | +production: | ||
65 | + adapter: postgresql | ||
66 | + encoding: unicode | ||
67 | + database: noosfero_production | ||
68 | + username: noosfero | ||
69 | + host: localhost | ||
70 | + port: 5432 | ||
71 | +EOF | ||
72 | + | ||
73 | +if [ -x /usr/bin/postgres ]; then | ||
74 | + if [ `systemctl is-active postgresql`!="active" ]; then | ||
75 | + postgresql-setup initdb || true | ||
76 | + systemctl start postgresql | ||
77 | + fi | ||
78 | + | ||
79 | + su postgres -c "createuser noosfero -S -d -R" | ||
80 | + su noosfero -c "createdb noosfero_production" | ||
81 | + | ||
82 | + cd /usr/lib/noosfero/ | ||
83 | + su noosfero -c "RAILS_ENV=production bundle exec rake db:schema:load" | ||
84 | + su noosfero -c "RAILS_ENV=production SCHEMA=/dev/null bundle exec rake db:migrate" | ||
85 | + su noosfero -c "RAILS_ENV=production bundle exec rake db:data:minimal" | ||
86 | +fi | ||
87 | + | ||
88 | +%preun | ||
89 | +service noosfero stop | ||
90 | +chkconfig --del noosfero | ||
91 | + | ||
92 | +%files | ||
93 | +/usr/lib/noosfero | ||
94 | +/var/lib/noosfero | ||
95 | +%doc |
@@ -0,0 +1,34 @@ | @@ -0,0 +1,34 @@ | ||
1 | +%undefine _configure_target | ||
2 | + | ||
3 | +Name: tango-icon-theme | ||
4 | +Version: 0.8.90 | ||
5 | +Release: alt2 | ||
6 | + | ||
7 | +Summary: Tango Icon Library | ||
8 | +License: Creative Commons Attribution Share-Alike license 2.5 | ||
9 | +Group: Graphical desktop/Other | ||
10 | +Url: http://tango.freedesktop.org/Tango_Desktop_Project | ||
11 | + | ||
12 | +Source0: http://tango-project.org/releases/%name-%version.tar.gz | ||
13 | + | ||
14 | +BuildArch: noarch | ||
15 | + | ||
16 | +BuildRequires: icon-naming-utils ImageMagick ImageMagick-devel perl-XML-Parser intltool | ||
17 | + | ||
18 | +%description | ||
19 | +This is an icon theme that follows the Tango visual guidelines. | ||
20 | + | ||
21 | +%prep | ||
22 | +%setup -q | ||
23 | + | ||
24 | +%build | ||
25 | +%configure | ||
26 | +make | ||
27 | + | ||
28 | +%install | ||
29 | +%make_install DESTDIR=%buildroot install | ||
30 | + | ||
31 | +%files | ||
32 | +%doc AUTHORS COPYING ChangeLog README | ||
33 | +%dir %_datadir/icons/Tango/ | ||
34 | +%_datadir/icons/Tango/ |