Commit cf14d020af1d3d46925c2b7e3237d904c6126a54
1 parent
4b84a64c
Exists in
master
Ajustes para empacotamento
Showing
7 changed files
with
281 additions
and
71 deletions
Show diff stats
.gitignore
@@ -15,10 +15,17 @@ stamp-h1 | @@ -15,10 +15,17 @@ stamp-h1 | ||
15 | *.zip | 15 | *.zip |
16 | *.tar | 16 | *.tar |
17 | *.bz2 | 17 | *.bz2 |
18 | -rpm | ||
19 | *.depend | 18 | *.depend |
20 | ChangeLog | 19 | ChangeLog |
21 | revision | 20 | revision |
22 | revision.m4 | 21 | revision.m4 |
23 | php3270.h | 22 | php3270.h |
24 | *.ini | 23 | *.ini |
24 | +rpm/BUILD | ||
25 | +rpm/BUILDROOT | ||
26 | +rpm/RPMS | ||
27 | +rpm/SOURCES | ||
28 | +rpm/SPECS | ||
29 | +rpm/SRPMS | ||
30 | + | ||
31 | + |
Makefile.in
@@ -62,6 +62,7 @@ SHELL=@SHELL@ | @@ -62,6 +62,7 @@ SHELL=@SHELL@ | ||
62 | STRIP=@STRIP@ | 62 | STRIP=@STRIP@ |
63 | MKDIR=@MKDIR_P@ | 63 | MKDIR=@MKDIR_P@ |
64 | PHPCONFIG=@PHPCONFIG@ | 64 | PHPCONFIG=@PHPCONFIG@ |
65 | +RPMBUILD=@RPMBUILD@ | ||
65 | 66 | ||
66 | CXX=@CXX@ | 67 | CXX=@CXX@ |
67 | CC=@CC@ | 68 | CC=@CC@ |
@@ -95,6 +96,20 @@ $(OBJRLS)/%.o: \ | @@ -95,6 +96,20 @@ $(OBJRLS)/%.o: \ | ||
95 | -DBUILD_DATE=`date +"0x%Y%m%d"` \ | 96 | -DBUILD_DATE=`date +"0x%Y%m%d"` \ |
96 | -o $@ -c $< | 97 | -o $@ -c $< |
97 | 98 | ||
99 | +%.tar.bz2: \ | ||
100 | + %.tar | ||
101 | + | ||
102 | + @echo $< ... | ||
103 | + @bzip2 --compress -9 --stdout $< > $@ | ||
104 | + @chmod 0644 $@ | ||
105 | + | ||
106 | +%.tar.gz: \ | ||
107 | + %.tar | ||
108 | + | ||
109 | + @echo $< ... | ||
110 | + @gzip -9 --stdout $< > $@ | ||
111 | + @chmod 0644 $@ | ||
112 | + | ||
98 | #---[ Release Targets ]------------------------------------------------------------------ | 113 | #---[ Release Targets ]------------------------------------------------------------------ |
99 | 114 | ||
100 | all: \ | 115 | all: \ |
@@ -112,6 +127,83 @@ install: \ | @@ -112,6 +127,83 @@ install: \ | ||
112 | @$(MKDIR) $(DESTDIR)/@PHPCONFDIR@ | 127 | @$(MKDIR) $(DESTDIR)/@PHPCONFDIR@ |
113 | @$(INSTALL_DATA) php.ini $(DESTDIR)/@PHPCONFDIR@/tn3270.ini | 128 | @$(INSTALL_DATA) php.ini $(DESTDIR)/@PHPCONFDIR@/tn3270.ini |
114 | 129 | ||
130 | +rpm: \ | ||
131 | + $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \ | ||
132 | + rpm/php5-pw3270.spec \ | ||
133 | + Makefile | ||
134 | + | ||
135 | + $(MKDIR) $(BASEDIR)/rpm | ||
136 | + $(MKDIR) $(BASEDIR)/rpm/SPECS | ||
137 | + $(MKDIR) $(BASEDIR)/rpm/SOURCES | ||
138 | + $(MKDIR) $(BASEDIR)/rpm/SRPMS | ||
139 | + $(MKDIR) $(BASEDIR)/rpm/RPMS | ||
140 | + $(MKDIR) $(BASEDIR)/rpm/BUILD | ||
141 | + $(MKDIR) $(BASEDIR)/rpm/BUILDROOT | ||
142 | + umask 002 ; $(RPMBUILD) \ | ||
143 | + --define="_topdir $(BASEDIR)/rpm" \ | ||
144 | + --define="_packager $(USER)@$(HOSTNAME)" \ | ||
145 | + --clean \ | ||
146 | + -ta $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 | ||
147 | + | ||
148 | +srpm: \ | ||
149 | + $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 \ | ||
150 | + rpm/php5-pw3270.spec \ | ||
151 | + Makefile | ||
152 | + | ||
153 | + @$(MKDIR) $(BASEDIR)/rpm | ||
154 | + @$(MKDIR) $(BASEDIR)/rpm/SPECS | ||
155 | + @$(MKDIR) $(BASEDIR)/rpm/SOURCES | ||
156 | + @$(MKDIR) $(BASEDIR)/rpm/SRPMS | ||
157 | + @$(MKDIR) $(BASEDIR)/rpm/RPMS | ||
158 | + @$(MKDIR) $(BASEDIR)/rpm/BUILD | ||
159 | + @$(MKDIR) $(BASEDIR)/rpm/BUILDROOT | ||
160 | + @umask 002 ; $(RPMBUILD) \ | ||
161 | + --define="_topdir $(PWD)/rpm" \ | ||
162 | + --define="_packager $(USER)@$(HOSTNAME)" \ | ||
163 | + --clean \ | ||
164 | + -ts $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2 | ||
165 | + | ||
166 | +$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar: \ | ||
167 | + $(SRCDIR) | ||
168 | + | ||
169 | + @$(AMTAR) \ | ||
170 | + --verbose \ | ||
171 | + --format=ustar \ | ||
172 | + --create \ | ||
173 | + --exclude-vcs \ | ||
174 | + --directory $(BASEDIR)/.src \ | ||
175 | + --owner=root \ | ||
176 | + --group=root \ | ||
177 | + --file=$@ \ | ||
178 | + $(PACKAGE_TARNAME)-@PACKAGE_VERSION@ | ||
179 | + | ||
180 | + | ||
181 | +$(SRCDIR): \ | ||
182 | + clean \ | ||
183 | + Makefile | ||
184 | + | ||
185 | + # Copia fontes | ||
186 | + @$(MKDIR) $(SRCDIR)/src | ||
187 | + @cp src/*.cc $(SRCDIR)/src | ||
188 | + @cp src/*.in $(SRCDIR)/src | ||
189 | + | ||
190 | + # Copia extras | ||
191 | + @cp -r scripts $(SRCDIR) | ||
192 | + @cp -r testprograms $(SRCDIR) | ||
193 | + | ||
194 | + # Copia documentos | ||
195 | + @cp AUTHORS $(SRCDIR) | ||
196 | + @cp LICENCA $(SRCDIR) | ||
197 | + @cp LICENSE $(SRCDIR) | ||
198 | + @cp README.md $(SRCDIR) | ||
199 | + | ||
200 | + # Copia configuradores | ||
201 | + @cp configure.ac $(SRCDIR) | ||
202 | + @cp *.in $(SRCDIR) | ||
203 | + @cp *.cbp $(SRCDIR) | ||
204 | + @cp rpm/*.spec $(SRCDIR) | ||
205 | + | ||
206 | + | ||
115 | $(BINRLS)/$(LIBNAME): \ | 207 | $(BINRLS)/$(LIBNAME): \ |
116 | $(foreach SRC, $(basename $(SOURCES)), $(OBJRLS)/$(SRC).o) | 208 | $(foreach SRC, $(basename $(SOURCES)), $(OBJRLS)/$(SRC).o) |
117 | 209 |
@@ -0,0 +1,13 @@ | @@ -0,0 +1,13 @@ | ||
1 | +Source: php5-pw3270 | ||
2 | +Section: unknown | ||
3 | +Priority: optional | ||
4 | +Maintainer: Perry Werneck <perry.werneck@gmail.com> | ||
5 | +Build-Depends: debhelper (>= 7), autotools-dev, autoconf, gettext, php5-dev, pw3270-dev | ||
6 | + | ||
7 | +Package: php5-pw3270 | ||
8 | +Architecture: any | ||
9 | +Depends: ${misc:Depends}, lib3270 (= ${binary:Version}) | ||
10 | +Description: PHP Extension Module implementing tn3270 protocol. | ||
11 | + This is an extension for acessing 3270 hosts directly from PHP apps. | ||
12 | + | ||
13 | + |
@@ -0,0 +1,96 @@ | @@ -0,0 +1,96 @@ | ||
1 | +#!/usr/bin/make -f | ||
2 | +# Sample debian/rules that uses debhelper. | ||
3 | +# GNU copyright 1997 to 1999 by Joey Hess. | ||
4 | + | ||
5 | +# Uncomment this to turn on verbose mode. | ||
6 | +export DH_VERBOSE=1 | ||
7 | + | ||
8 | +# This is the debhelper compatibility version to use. | ||
9 | +export DH_COMPAT=4 | ||
10 | + | ||
11 | +CFLAGS = -g | ||
12 | +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) | ||
13 | +CFLAGS += -O0 | ||
14 | +else | ||
15 | +CFLAGS += -O2 | ||
16 | +endif | ||
17 | + | ||
18 | +build: build-stamp | ||
19 | +build-stamp: | ||
20 | + dh_testdir | ||
21 | + | ||
22 | + # Add here commands to compile the package. | ||
23 | + aclocal | ||
24 | + autoconf | ||
25 | + | ||
26 | + ./configure | ||
27 | + | ||
28 | + rm -f debian/*.install | ||
29 | + make clean | ||
30 | + make Release | ||
31 | + # --- end custom part for compiling | ||
32 | + | ||
33 | + touch build-stamp | ||
34 | + | ||
35 | +clean: | ||
36 | + dh_testdir | ||
37 | + dh_testroot | ||
38 | + rm -f build-stamp | ||
39 | + | ||
40 | + # Add here commands to clean up after the build process. | ||
41 | + if [ -e Makefile ]; then make clean ; fi | ||
42 | + # --- end custom part for cleaning up | ||
43 | + | ||
44 | + dh_clean | ||
45 | + | ||
46 | +install: build | ||
47 | + dh_testdir | ||
48 | + dh_testroot | ||
49 | + dh_clean -k | ||
50 | + dh_installdirs | ||
51 | + | ||
52 | + # Install ooRexx extension | ||
53 | + make DESTDIR=$(PWD)/debian/php5-pw3270 install | ||
54 | + | ||
55 | + # Create updated file lists | ||
56 | + find $(PWD)/debian/php5-pw3270 -type f | sed -e "s@^$(PWD)/debian/php5-pw3270/@/@g" > $(PWD)/debian/php5-pw3270.install | ||
57 | + | ||
58 | + | ||
59 | + # --- end custom part for installing | ||
60 | + | ||
61 | +# Build architecture-independent files here. | ||
62 | +binary-indep: build install | ||
63 | + # We have nothing to do by default. | ||
64 | + | ||
65 | +# Build architecture-dependent files here. | ||
66 | +binary-arch: build install | ||
67 | + dh_testdir | ||
68 | + dh_testroot | ||
69 | +# dh_installdebconf | ||
70 | + dh_installdocs | ||
71 | + dh_installexamples | ||
72 | + dh_installmenu | ||
73 | +# dh_installlogrotate | ||
74 | +# dh_installemacsen | ||
75 | +# dh_installpam | ||
76 | +# dh_installmime | ||
77 | +# dh_installinit | ||
78 | + dh_installcron | ||
79 | + dh_installman | ||
80 | + dh_installinfo | ||
81 | +# dh_undocumented | ||
82 | + dh_installchangelogs | ||
83 | + dh_link | ||
84 | + dh_strip | ||
85 | + dh_compress | ||
86 | + dh_fixperms | ||
87 | +# dh_makeshlibs | ||
88 | + dh_installdeb | ||
89 | +# dh_perl | ||
90 | +# dh_shlibdeps | ||
91 | + dh_gencontrol | ||
92 | + dh_md5sums | ||
93 | + dh_builddeb | ||
94 | + | ||
95 | +binary: binary-indep binary-arch | ||
96 | +.PHONY: build clean binary-indep binary-arch binary install |
php5-pw3270.spec
@@ -1,70 +0,0 @@ | @@ -1,70 +0,0 @@ | ||
1 | -%define _phpextdir %(php-config --extension-dir) | ||
2 | -%define _phpconf %(php-config | sed 's@ @\\n@g' | grep "^--with-config-file-scan-dir=" | cut -d= -f2) | ||
3 | - | ||
4 | -Summary: PHP5 Extension Module implementing tn3270 protocol | ||
5 | -Name: php5-pw3270 | ||
6 | -Version: 5.1 | ||
7 | -Release: 0 | ||
8 | -License: GPL-2.0 | ||
9 | -Source: %{name}-%{version}.tar.bz2 | ||
10 | -URL: https://portal.softwarepublico.gov.br/social/pw3270/ | ||
11 | -Group: Development/Languages/PHP | ||
12 | - | ||
13 | -BuildRoot: /var/tmp/%{name}-%{version} | ||
14 | - | ||
15 | -BuildRequires: autoconf >= 2.61 | ||
16 | -BuildRequires: automake | ||
17 | -BuildRequires: binutils | ||
18 | -BuildRequires: coreutils | ||
19 | -BuildRequires: gcc-c++ | ||
20 | -BuildRequires: m4 | ||
21 | -BuildRequires: pkgconfig | ||
22 | -BuildRequires: php5-devel | ||
23 | -BuildRequires: pw3270-devel >= 5.1 | ||
24 | - | ||
25 | -Requires: pw3270 >= 5.1 | ||
26 | - | ||
27 | -%description | ||
28 | - | ||
29 | -This is an extension for acessing 3270 hosts directly | ||
30 | -from PHP apps. | ||
31 | - | ||
32 | -%prep | ||
33 | - | ||
34 | -%setup | ||
35 | - | ||
36 | -export CFLAGS="$RPM_OPT_FLAGS" | ||
37 | -export CXXFLAGS="$RPM_OPT_FLAGS" | ||
38 | -export FFLAGS="$RPM_OPT_FLAGS" | ||
39 | - | ||
40 | -aclocal | ||
41 | -autoconf | ||
42 | -%configure | ||
43 | - | ||
44 | -%build | ||
45 | -make clean | ||
46 | -make Release | ||
47 | - | ||
48 | -%install | ||
49 | -rm -rf $RPM_BUILD_ROOT | ||
50 | - | ||
51 | -%makeinstall | ||
52 | - | ||
53 | -%fdupes $RPM_BUILD_ROOT | ||
54 | - | ||
55 | -%clean | ||
56 | -rm -rf $RPM_BUILD_ROOT | ||
57 | - | ||
58 | -%files | ||
59 | -%defattr(-,root,root) | ||
60 | -%config %{_phpconf}/tn3270.ini | ||
61 | -%{_phpextdir}/*.so | ||
62 | - | ||
63 | -%files -n ooRexx-extension-tn3270 | ||
64 | -%{_libdir}/librx3270.* | ||
65 | -%{_datadir}/ooRexx/rx3270.cls | ||
66 | - | ||
67 | - | ||
68 | -%changelog | ||
69 | - | ||
70 | - |
@@ -0,0 +1,66 @@ | @@ -0,0 +1,66 @@ | ||
1 | +%define _phpextdir %(php-config --extension-dir) | ||
2 | +%define _phpconf %(php-config | sed 's@ @\\n@g' | grep "^--with-config-file-scan-dir=" | cut -d= -f2) | ||
3 | + | ||
4 | +Summary: PHP5 Extension Module implementing tn3270 protocol | ||
5 | +Name: php5-pw3270 | ||
6 | +Version: 5.1 | ||
7 | +Release: 0 | ||
8 | +License: GPL-2.0 | ||
9 | +Source: %{name}-%{version}.tar.bz2 | ||
10 | +URL: https://softwarepublico.gov.br/gitlab/pw3270/pw3270-php5 | ||
11 | +Group: Development/Languages/PHP | ||
12 | + | ||
13 | +BuildRoot: /var/tmp/%{name}-%{version} | ||
14 | + | ||
15 | +BuildRequires: autoconf >= 2.61 | ||
16 | +BuildRequires: automake | ||
17 | +BuildRequires: binutils | ||
18 | +BuildRequires: coreutils | ||
19 | +BuildRequires: gcc-c++ | ||
20 | +BuildRequires: m4 | ||
21 | +BuildRequires: pkgconfig | ||
22 | +BuildRequires: php5-devel | ||
23 | +BuildRequires: pw3270-devel >= 5.1 | ||
24 | + | ||
25 | +Requires: lib3270 >= 5.1 | ||
26 | +Requires: php5 | ||
27 | + | ||
28 | +%description | ||
29 | + | ||
30 | +This is an extension for acessing 3270 hosts directly | ||
31 | +from PHP apps. | ||
32 | + | ||
33 | +%prep | ||
34 | + | ||
35 | +%setup | ||
36 | + | ||
37 | +export CFLAGS="$RPM_OPT_FLAGS" | ||
38 | +export CXXFLAGS="$RPM_OPT_FLAGS" | ||
39 | +export FFLAGS="$RPM_OPT_FLAGS" | ||
40 | + | ||
41 | +aclocal | ||
42 | +autoconf | ||
43 | +%configure | ||
44 | + | ||
45 | +%build | ||
46 | +make clean | ||
47 | +make Release | ||
48 | + | ||
49 | +%install | ||
50 | +rm -rf $RPM_BUILD_ROOT | ||
51 | + | ||
52 | +%makeinstall | ||
53 | + | ||
54 | +%fdupes $RPM_BUILD_ROOT | ||
55 | + | ||
56 | +%clean | ||
57 | +rm -rf $RPM_BUILD_ROOT | ||
58 | + | ||
59 | +%files | ||
60 | +%defattr(-,root,root) | ||
61 | +%config %{_phpconf}/tn3270.ini | ||
62 | +%{_phpextdir}/*.so | ||
63 | + | ||
64 | +%changelog | ||
65 | + | ||
66 | + |