diff --git a/nodejs-mime-db.spec b/nodejs-mime-db.spec new file mode 100644 index 0000000..6b19919 --- /dev/null +++ b/nodejs-mime-db.spec @@ -0,0 +1,52 @@ +%{?nodejs_find_provides_and_requires} +%global packagename mime-db +%global enable_tests 1 +Name: nodejs-mime-db +Version: 1.26.0 +Release: 1 +Summary: This is a database of all mime types +License: MIT +URL: https://github.com/jshttp/mime-db +Source0: https://github.com/jshttp/mime-db/archive/v%{version}.tar.gz +ExclusiveArch: %{nodejs_arches} noarch +BuildArch: noarch +BuildRequires: nodejs-packaging +%if 0%{?enable_tests} +BuildRequires: mocha +%endif +Requires: nodejs +%description +This is a database of all mime types. It consists of a single, public JSON +file and does not include any logic, allowing it to remain as un-opinionated +as possible with an API. It aggregates data from the following sources: + * http://www.iana.org/assignments/media-types/media-types.xhtml + * http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types + * http://hg.nginx.org/nginx/raw-file/default/conf/mime.types + +%prep +%setup -q -n %{packagename}-%{version} + +%build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} +cp -pr package.json *.js db.json src/ scripts/ \ + %{buildroot}%{nodejs_sitelib}/%{packagename} +%nodejs_symlink_deps + +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +%if 0%{?enable_tests} +/usr/bin/mocha -R spec +%endif + +%files +%{!?_licensedir:%global license %doc} +%doc README.md HISTORY.md +%license LICENSE +%{nodejs_sitelib}/%{packagename} + +%changelog +* Mon Aug 17 2020 wutao - 1.26.0-1 +- Package init diff --git a/nodejs-mime-db.yaml b/nodejs-mime-db.yaml new file mode 100644 index 0000000..8b7e5b5 --- /dev/null +++ b/nodejs-mime-db.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: jshttp/mime-db +tag_prefix: "^v" +seperator: "." diff --git a/v1.26.0.tar.gz b/v1.26.0.tar.gz new file mode 100644 index 0000000..9d9613e Binary files /dev/null and b/v1.26.0.tar.gz differ