-
Notifications
You must be signed in to change notification settings - Fork 4
/
njs2rpm.spec
76 lines (63 loc) · 2.46 KB
/
njs2rpm.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
%define distnum %{expand:%%(/usr/lib/rpm/redhat/dist.sh --distnum)}
%define disttype %{expand:%%(/usr/lib/rpm/redhat/dist.sh --disttype)}
%define debug_package %{nil}
%define prefix /opt/ptin
%define _prefix %{prefix}/%{name}
%define _docdir %{prefix}/%{name}/doc
Name : njs2rpm
Version : 1.0.3
Release : 1.%{disttype}%{distnum}
Summary: NJS2RPM - convert NodeJS module to RPM
Group: Development/Libraries
License: LGPLv2+
Source: %{name}-%{version}.tar.gz
URL: https://github.com/sfreire/njs2rpm
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
Requires: redhat-rpm-config, tar, coreutils, wget, nodejs-packaging, nodejs-devel, npm, rpm-build
%description
NJS2RPM - convert NodeJS modules to RPM packages (by Sergio Freire)
A simple Bash script to build RPMs of any available NodeJS module, any version. It fetches the source from NPM Registry and builds the RPM. Simple, isn't it?
No more NodeJS modules installed ad-hoc using "npm".
%prep
%setup
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/bin
mkdir -p %{buildroot}/%{_prefix}/bin
mkdir -p %{buildroot}/%{_docdir}
cp njs2rpm %{buildroot}/%{_prefix}/bin
cp default.n2r %{buildroot}/%{_prefix}/bin
cp *.md LICENSE %{buildroot}/%{_docdir}
ln -s %{_prefix}/bin/njs2rpm %{buildroot}/usr/bin/njs2rpm
%clean
rm -rf %{buildroot}
%pre
%post
%preun
%files
%defattr (0755,root,root,0755)
%dir %{_prefix}/bin
%{_prefix}/bin/*
/usr/bin/njs2rpm
%{_docdir}/README.md
%{_docdir}/LICENSE
%changelog
* Mon May 19 2014 JM Goncalves <[email protected]> - 1.0.3-1
- added rpm-build to Requires
- fixed egrep multi-match in license retrieval (caused problems with MIT License)
* Tue Jan 21 2014 Sergio Freire <[email protected]> - 1.0.2-1
- fixed issue #1 (problem with user defined _topdir)
* Thu Nov 8 2013 Sergio Freire <[email protected]> - 1.0.1-1
- changed default template so RPM macro _rpmconfigdir points to 32 bit libs diretory. have to fix this better
- disabled debuginfo packages on default template
- avoid stderr messages of tar in RHEL5
* Thu Nov 7 2013 Sergio Freire <[email protected]> - 1.0.0-4
- describe better the package description
- removed my email from the default template
* Thu Nov 7 2013 Sergio Freire <[email protected]> - 1.0.0-3
- change name from n2r to njs2rpm
- included LICENSE
* Wed Nov 6 2013 Sergio Freire <[email protected]> - 1.0.0-2
- first public release, compatible with RHEL5 and RHEL6