]>
Commit | Line | Data |
---|---|---|
1b10e3db JB |
1 | # TODO: |
2 | # - build from source, see e.g.: | |
3 | # http://pkgs.fedoraproject.org/cgit/byteman.git/plain/byteman.spec | |
4 | # - javadocs | |
5 | # | |
1b10e3db JB |
6 | Summary: Java agent-based bytecode injection tool |
7 | Summary(pl.UTF-8): Oparte na agencie narzędzie do wstrzykiwania kodu dla Javy | |
8 | Name: byteman | |
00492f93 | 9 | Version: 3.0.1 |
1b10e3db JB |
10 | Release: 1 |
11 | License: LGPL v2+ | |
12 | Group: Development/Languages/Java | |
13 | #Source0Download: https://www.jboss.org:443/byteman/downloads.html | |
14 | Source0: http://downloads.jboss.org/byteman/%{version}/byteman-download-%{version}-full.zip | |
00492f93 | 15 | # Source0-md5: c704769662f4dd06233dc659f2d24329 |
1b10e3db JB |
16 | URL: http://www.jboss.com/byteman/ |
17 | # this is needed for the LC_ALL=en_US in build part dependency | |
18 | %if %(locale -a | grep -q '^en_US$'; echo $?) | |
19 | #BuildRequires: glibc-localedb-all | |
20 | %endif | |
21 | BuildRequires: jpackage-utils | |
22 | BuildRequires: rpm-javaprov | |
23 | BuildRequires: rpmbuild(macros) >= 1.300 | |
24 | # to build from source: | |
25 | #BuildRequires: jarjar | |
26 | #BuildRequires: java_cup | |
27 | #BuildRequires: javapackages-tools | |
28 | #BuildRequires: jdk | |
29 | #BuildRequires: junit4 | |
30 | #BuildRequires: maven-failsafe-plugin | |
31 | #BuildRequires: maven-jar-plugin | |
32 | #BuildRequires: maven-local | |
33 | #BuildRequires: maven-shade-plugin | |
34 | #BuildRequires: maven-surefire-plugin | |
35 | #BuildRequires: maven-surefire-provider-junit4 | |
36 | #BuildRequires: maven-surefire-provider-testng | |
37 | #BuildRequires: maven-verifier-plugin | |
38 | #BuildRequires: objectweb-asm | |
39 | #BuildRequires: testng | |
40 | Requires: jpackage-utils | |
41 | BuildArch: noarch | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
44 | %description | |
45 | Byteman is a tool which simplifies tracing and testing of Java | |
46 | programs. Byteman allows you to insert extra Java code into your | |
47 | application, either as it is loaded during JVM startup or even after | |
48 | it has already started running. The injected code is allowed to access | |
49 | any of your data and call any application methods, including where | |
50 | they are private. You can inject code almost anywhere you want and | |
51 | there is no need to prepare the original source code in advance nor do | |
52 | you have to recompile, repackage or redeploy your application. In fact | |
53 | you can remove injected code and reinstall different code while the | |
54 | application continues to execute. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Byteman to narzędzie upraszczajace śledzenie i testowanie programów w | |
58 | Javie. Pozwala wstawić dodatkowy kod w Javie do aplikacji - albo w | |
59 | trakcie wczytywania go przy uruchamianiu JVM, albo nawet po jej | |
60 | uruchomieniu. Wstrzyknięty kod ma dostęp do dowolnych danych i może | |
61 | wywoływać dowolne metody aplikacji, włącznie z prywatnymi. Kod można | |
62 | wstrzyknąć prawie wszędzie i nie ma potrzeby wcześniejszego | |
63 | przygotowywania kodu źródłowego ani rekompilacji, ponownego | |
64 | pakietowania ani wdrażania aplikacji. W praktyce można usunąć | |
65 | wstrzyknięty kod i zainstalować inny kod, kiedy aplikacja cały czas | |
66 | działa. | |
67 | ||
68 | %package javadoc | |
69 | Summary: Javadocs for Byteman | |
70 | Summary(pl.UTF-8): Dokumentacja w formacie javadoc do Bytemana | |
71 | Group: Documentation | |
72 | Requires: jpackage-utils | |
73 | ||
74 | %description javadoc | |
75 | Javadocs for Byteman. | |
76 | ||
77 | %description javadoc -l pl.UTF-8 | |
78 | Dokumentacja w formacie javadoc do Bytemana. | |
79 | ||
80 | %prep | |
81 | %setup -q -n byteman-download-%{version} | |
82 | ||
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | install -d $RPM_BUILD_ROOT{%{_javadir}/byteman,%{_datadir}/byteman/{bin,lib},%{_bindir}} | |
86 | ||
87 | cp -p lib/byteman*.jar contrib/bmunit/byteman-bmunit.jar contrib/dtest/byteman-dtest.jar \ | |
88 | $RPM_BUILD_ROOT%{_javadir}/byteman | |
89 | for f in $RPM_BUILD_ROOT%{_javadir}/byteman/byteman*.jar ; do | |
90 | ln -sf %{_javadir}/$(basename $f) $RPM_BUILD_ROOT%{_datadir}/byteman/lib | |
91 | done | |
92 | install bin/{bmcheck,bmjava,bminstall,bmsubmit}.sh $RPM_BUILD_ROOT%{_datadir}/byteman/bin | |
93 | for f in bmcheck bmjava bminstall bmsubmit ; do | |
94 | cat >$RPM_BUILD_ROOT%{_bindir}/$f <<EOF | |
95 | #!/bin/sh | |
96 | ||
97 | BYTEMAN_HOME=%{_datadir}/byteman | |
98 | JAVA_HOME=%{_jvmdir}/java | |
99 | ||
100 | \$BYTEMAN_HOME/bin/${f}.sh "\$@" | |
101 | EOF | |
102 | done | |
103 | ||
104 | # TODO: javadocs | |
105 | ||
106 | %clean | |
107 | rm -rf $RPM_BUILD_ROOT | |
108 | ||
109 | %files | |
110 | %defattr(644,root,root,755) | |
111 | %attr(755,root,root) %{_bindir}/bmcheck | |
112 | %attr(755,root,root) %{_bindir}/bmjava | |
113 | %attr(755,root,root) %{_bindir}/bminstall | |
114 | %attr(755,root,root) %{_bindir}/bmsubmit | |
115 | %{_javadir}/byteman | |
116 | %dir %{_datadir}/byteman | |
117 | %dir %{_datadir}/byteman/bin | |
118 | %attr(755,root,root) %{_datadir}/byteman/bin/*.sh | |
119 | %{_datadir}/byteman/lib | |
120 | ||
121 | # TODO | |
122 | #%files javadoc | |
123 | #%defattr(644,root,root,755) | |
124 | #%{_javadocdir}/byteman-%{version} |