Commit 1e4047bc5a5a687e5e37427b113d66d2565b410f
1 parent
bbb897bd
Exists in
master
and in
5 other branches
Ajustando empacotamento do módulo PHP
Showing
4 changed files
with
48 additions
and
3 deletions
Show diff stats
Makefile.in
... | ... | @@ -157,6 +157,13 @@ $(BINDIR)/Release/$(PACKAGE_NAME).oxt: |
157 | 157 | @$(MKDIR) `dirname $@` |
158 | 158 | @cp src/loffice/.bin/Release/$(PACKAGE_NAME).oxt $@ |
159 | 159 | |
160 | +php: $(BINDIR)/Release/tn3270.so | |
161 | + | |
162 | +$(BINDIR)/Release/tn3270.so: | |
163 | + @$(MAKE) -C src/php Release | |
164 | + @$(MKDIR) `dirname $@` | |
165 | + @cp src/php/.bin/Release/php3270.so $@ | |
166 | + | |
160 | 167 | #---[ Debug targets ]---------------------------------------------------------- |
161 | 168 | |
162 | 169 | Debug: $(BINDIR)/Debug/$(PACKAGE_TARNAME)$(EXEEXT) \ |
... | ... | @@ -341,6 +348,9 @@ install-sdk: |
341 | 348 | install-oxt: |
342 | 349 | @$(MAKE) BINDIR=../../.bin LIB3270_CFLAGS="-I../../src/include" -C src/loffice install |
343 | 350 | |
351 | +install-php: | |
352 | + @$(MAKE) -C src/php install | |
353 | + | |
344 | 354 | install-plugin-rexx: |
345 | 355 | @$(MAKE) BINDIR=../../../.bin LIB3270_CFLAGS="-I../../src/include" -C src/plugins/rx3270 install |
346 | 356 | |
... | ... | @@ -359,6 +369,7 @@ clean: |
359 | 369 | @make -C src/plugins/rx3270 clean |
360 | 370 | @make -C src/plugins/dbus3270 clean |
361 | 371 | @make -C src/loffice clean |
372 | + @make -C src/php clean | |
362 | 373 | @make -C src/classlib clean |
363 | 374 | @rm -f $(PACKAGE_NAME).png |
364 | 375 | @rm -f $(PACKAGE_NAME)-logo.png | ... | ... |
configure.ac
... | ... | @@ -387,6 +387,7 @@ if test -z "${PHPCONFIG}"; then |
387 | 387 | AC_MSG_NOTICE([Program php-config not found. Use --with-php-config=path to specify absolute path to the php-config tool.]) |
388 | 388 | else |
389 | 389 | AC_DEFINE(HAVE_PHP) |
390 | + EXTENSIONS="$EXTENSIONS php" | |
390 | 391 | fi |
391 | 392 | |
392 | 393 | AC_SUBST(PHPCONFIG) | ... | ... |
po/pt_BR.po
... | ... | @@ -5,7 +5,7 @@ msgid "" |
5 | 5 | msgstr "" |
6 | 6 | "Project-Id-Version: pw3270 5.0\n" |
7 | 7 | "Report-Msgid-Bugs-To: \n" |
8 | -"POT-Creation-Date: 2014-04-07 08:52-0300\n" | |
8 | +"POT-Creation-Date: 2014-04-11 15:48-0300\n" | |
9 | 9 | "PO-Revision-Date: 2014-02-17 08:05-0300\n" |
10 | 10 | "Last-Translator: Perry Werneck <perry.werneck@gmail.com>\n" |
11 | 11 | "Language-Team: Portugues <>\n" | ... | ... |
pw3270.spec.in
... | ... | @@ -34,8 +34,13 @@ |
34 | 34 | %define _release %{_rel} |
35 | 35 | %define _distro Linux |
36 | 36 | %define _redhat %(test -e /etc/redhat-release && echo 1 || echo 0) |
37 | +%define _php %(which php-config 2> /dev/null > /dev/null && echo 1 || echo 0) | |
37 | 38 | %define _bldreq gtk3-devel libopenssl-devel |
38 | 39 | |
40 | +%if 0%{?_php} | |
41 | + %define phpmajor %(php-config --version | cut -d. -f1) | |
42 | +%endif | |
43 | + | |
39 | 44 | %if 0%{?suse_version} |
40 | 45 | %define _release %{_rel}.suse%{suse_version} |
41 | 46 | %define _distro SuSE Linux %{suse_version} |
... | ... | @@ -77,6 +82,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build |
77 | 82 | Requires: openssl shared-mime-info lib3270 = @PACKAGE_VERSION@ |
78 | 83 | Provides: lib@PACKAGE@ = @PACKAGE_VERSION@ lib@PACKAGE@.so = @PACKAGE_VERSION@ |
79 | 84 | Distribution: %_distro |
85 | + | |
86 | +BuildRequires: which | |
80 | 87 | BuildRequires: autoconf >= 2.61 |
81 | 88 | BuildRequires: automake |
82 | 89 | BuildRequires: gcc-c++ |
... | ... | @@ -95,6 +102,10 @@ BuildRequires: libreoffice-sdk |
95 | 102 | BuildRequires: ucpp |
96 | 103 | %endif |
97 | 104 | |
105 | +%if 0%{?_php} | |
106 | +BuildRequires: php-devel | |
107 | +%endif | |
108 | + | |
98 | 109 | BuildRequires: rsvg-view |
99 | 110 | |
100 | 111 | %description |
... | ... | @@ -170,6 +181,21 @@ allowing rexx scripts to access tn3270e hosts. |
170 | 181 | Revision @PACKAGE_REVISION@ from @PACKAGE_SOURCE@ |
171 | 182 | %endif |
172 | 183 | |
184 | +%if 0%{?_php} | |
185 | + | |
186 | +%package -n php%{phpmajor}-tn3270 | |
187 | +Summary: PHP%{phpmajor} Extension Module implementing tn3270 protocol | |
188 | +Group: Development/Libraries/PHP | |
189 | +Requires: lib3270 = @PACKAGE_VERSION@ | |
190 | + | |
191 | +%description -n php%{phpmajor}-tn3270 | |
192 | +This is an extension for acessing 3270 hosts directly | |
193 | +from PHP apps. | |
194 | + | |
195 | +Revision @PACKAGE_REVISION@ from @PACKAGE_SOURCE@ | |
196 | + | |
197 | +%endif | |
198 | + | |
173 | 199 | #---[ Build & Install ]----------------------------------------------------------------------------------------------- |
174 | 200 | |
175 | 201 | %prep |
... | ... | @@ -185,9 +211,9 @@ export FFLAGS="$RPM_OPT_FLAGS" |
185 | 211 | %if 0%{?_office} |
186 | 212 | export OFFICE_HOME=%{_libdir}/libreoffice |
187 | 213 | export OO_SDK_HOME=%{_libdir}/libreoffice/sdk |
188 | -%configure | |
214 | +%configure --sysconfdir=%{_sysconfdir} | |
189 | 215 | %else |
190 | -%configure --disable-office | |
216 | +%configure --disable-office --sysconfdir=%{_sysconfdir} | |
191 | 217 | %endif |
192 | 218 | |
193 | 219 | %build |
... | ... | @@ -272,6 +298,13 @@ rm -rf $RPM_BUILD_ROOT |
272 | 298 | %{_datadir}/pw3270/ui/80rexx.xml |
273 | 299 | %endif |
274 | 300 | |
301 | +%if 0%{?_php} | |
302 | +%files -n php%{phpmajor}-tn3270 | |
303 | +%defattr(-,root,root) | |
304 | +%{_sysconfdir}/php%{phpmajor}/conf.d/tn3270.ini | |
305 | +%{_libdir}/php%{phpmajor}/extensions/tn3270.so | |
306 | +%endif | |
307 | + | |
275 | 308 | #---[ Scripts ]------------------------------------------------------------------------------------------------------- |
276 | 309 | |
277 | 310 | %post | ... | ... |