From fff21fdff6baa7cc843d28ee04450ec2bab00a2f Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Tue, 17 Oct 2017 17:00:26 +0200 Subject: [PATCH] Remove all remaining mentions of "subscriptions" --- .gitignore | 2 -- Makefile | 16 +++++++++------- README.md | 5 +++-- docs/build-notes.md | 4 ++-- org.cockpit-project.starter.metainfo.xml | 15 +++++++++++++++ ...-project.subscription-manager.metainfo.xml | 15 --------------- package.json | 6 +++--- src/index.es6 | 4 ++-- src/index.html | 7 ++----- src/index.js | 4 +--- src/manifest.json | 2 +- ...riptions-view.jsx => starter-kit-view.jsx} | 2 +- src/subscriptions.css | 19 ------------------- ...nager-cockpit.spec => starter-cockpit.spec | 12 +++++------- webpack.config.js | 3 +-- 15 files changed, 45 insertions(+), 71 deletions(-) create mode 100644 org.cockpit-project.starter.metainfo.xml delete mode 100644 org.cockpit-project.subscription-manager.metainfo.xml rename src/{subscriptions-view.jsx => starter-kit-view.jsx} (95%) delete mode 100644 src/subscriptions.css rename subscription-manager-cockpit.spec => starter-cockpit.spec (54%) diff --git a/.gitignore b/.gitignore index d681dd2..7c1d36d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,3 @@ node_modules/ dist/ /.vagrant /webpack.inputs -/subscription-manager-cockpit.tar.gz -/subscription-manager-cockpit-*.*.rpm diff --git a/Makefile b/Makefile index af9d640..3b28abc 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +PACKAGE_NAME := $(shell python3 -c "import json; print(json.load(open('package.json'))['name'])") + all: NODE_ENV=$(NODE_ENV) npm run build @@ -8,14 +10,14 @@ clean: install: all install-only install-only: - mkdir -p $(DESTDIR)/usr/share/cockpit/subscription-manager - cp -r dist/* $(DESTDIR)/usr/share/cockpit/subscription-manager + mkdir -p $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) + cp -r dist/* $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME) mkdir -p $(DESTDIR)/usr/share/metainfo/ - cp org.cockpit-project.subscription-manager.metainfo.xml $(DESTDIR)/usr/share/metainfo/ + cp org.cockpit-project.$(PACKAGE_NAME).metainfo.xml $(DESTDIR)/usr/share/metainfo/ EXTRA_DIST = \ README.md \ - org.cockpit-project.subscription-manager.metainfo.xml \ + org.cockpit-project.$(PACKAGE_NAME).metainfo.xml \ package.json \ .eslintrc.json \ webpack.config.js \ @@ -25,13 +27,13 @@ EXTRA_DIST = \ # when building a distribution tarball, call webpack with a 'production' environment dist-gzip: NODE_ENV=production dist-gzip: clean all - tar czf subscription-manager-cockpit.tar.gz --transform 's,^,subscription-manager-cockpit/,' $$(cat webpack.inputs) $(EXTRA_DIST) dist/ + tar czf $(PACKAGE_NAME)-cockpit.tar.gz --transform 's,^,$(PACKAGE_NAME)-cockpit/,' $$(cat webpack.inputs) $(EXTRA_DIST) dist/ srpm: dist-gzip rpmbuild -bs \ --define "_sourcedir `pwd`" \ --define "_srcrpmdir `pwd`" \ - subscription-manager-cockpit.spec + $(PACKAGE_NAME)-cockpit.spec rpm: dist-gzip mkdir -p "`pwd`/output" @@ -43,6 +45,6 @@ rpm: dist-gzip --define "_srcrpmdir `pwd`" \ --define "_rpmdir `pwd`/output" \ --define "_buildrootdir `pwd`/build" \ - subscription-manager-cockpit.spec + $(PACKAGE_NAME)-cockpit.spec find `pwd`/output -name '*.rpm' -printf '%f\n' -exec mv {} . \; rm -r "`pwd`/rpmbuild" diff --git a/README.md b/README.md index e205f9d..c4360fd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# Subscription-manager -**A Cockpit plugin to administer candlepin subscriptions** +# Cockpit Starter Kit + +Scaffolding for a [Cockpit](http://www.cockpit-project.org) module. See [docs/build-notes.md](docs/build-notes.md) for more information on how to build and install this package. diff --git a/docs/build-notes.md b/docs/build-notes.md index 4df5143..d848334 100644 --- a/docs/build-notes.md +++ b/docs/build-notes.md @@ -4,7 +4,7 @@ These are some basic notes on building the plugin ## yarn -The subscription-manager plugin for cockpit is built using webpack 2.x. Although npm can be used to install the various +The starter kit plugin for cockpit is built using webpack 2.x. Although npm can be used to install the various dependencies, it is recommended to install [yarn][-yarnpkg] and use it instead: ``` @@ -72,7 +72,7 @@ make Then, link the `dist` directory in a place where cockpit can find it, without installing to the system directory. Call the following script from the git checkout: ``` -ln -s ./dist subscription-manager +ln -s ./dist starter ``` Then use webpack to monitor the filesystem for changes, also from the git checkout: diff --git a/org.cockpit-project.starter.metainfo.xml b/org.cockpit-project.starter.metainfo.xml new file mode 100644 index 0000000..93c2dae --- /dev/null +++ b/org.cockpit-project.starter.metainfo.xml @@ -0,0 +1,15 @@ + + org.cockpit-project.starter + CC0-1.0 + Starter Kit + + Scaffolding for a cockpit module. + + +

+ Scaffolding for a cockpit module. +

+
+ cockpit.desktop + starter-cockpit +
diff --git a/org.cockpit-project.subscription-manager.metainfo.xml b/org.cockpit-project.subscription-manager.metainfo.xml deleted file mode 100644 index bee58e1..0000000 --- a/org.cockpit-project.subscription-manager.metainfo.xml +++ /dev/null @@ -1,15 +0,0 @@ - - org.cockpit-project.subscription-manager - CC0-1.0 - Subscription Manager - - Subscription Manager in Cockpit - - -

- Manage subscriptions to a Candlepin backend, such as for Red Hat products. -

-
- cockpit.desktop - subscription-manager-cockpit -
diff --git a/package.json b/package.json index b2630f5..889fc2c 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "subscription-manager", + "name": "starter", "version": "0.1.0", - "description": "a plugin for cockpit to manage subscriptions", + "description": "Scaffolding for a cockpit module", "main": "index.js", - "repository": "git@github.com:rarebreed/subscription-manager.git", + "repository": "git@github.com:cockpit/starter-kit.git", "author": "", "license": "LGPL-2.1", "scripts": { diff --git a/src/index.es6 b/src/index.es6 index 5ce38ce..8a46fcb 100644 --- a/src/index.es6 +++ b/src/index.es6 @@ -18,12 +18,12 @@ * along with Cockpit; If not, see . */ import React from 'react'; -import { Subscriptions } from './subscriptions-view.jsx'; +import { StarterKit } from './starter-kit-view.jsx'; function render() { React.render( React.createElement( - Subscriptions, + StarterKit, {title: "Sample Page"} ), document.getElementById('app') diff --git a/src/index.html b/src/index.html index dda2c18..794a072 100644 --- a/src/index.html +++ b/src/index.html @@ -1,7 +1,5 @@ - Subscriptions + Cockpit Starter Kit - diff --git a/src/index.js b/src/index.js index 3f840fd..771afd4 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,4 @@ /* - * This file is part of Cockpit. - * * Copyright (C) 2017 Red Hat, Inc. * * Cockpit is free software; you can redistribute it and/or modify it @@ -14,7 +12,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License - * along with subscription-manager; If not, see . + * along with this package; If not, see . */ var cockpit = require("cockpit"); diff --git a/src/manifest.json b/src/manifest.json index 82c04d9..3e2454a 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -6,7 +6,7 @@ "tools": { "index": { - "label": "subscription-manager" + "label": "Starter Kit" } } } diff --git a/src/subscriptions-view.jsx b/src/starter-kit-view.jsx similarity index 95% rename from src/subscriptions-view.jsx rename to src/starter-kit-view.jsx index c75876a..732744a 100644 --- a/src/subscriptions-view.jsx +++ b/src/starter-kit-view.jsx @@ -19,7 +19,7 @@ */ import React from 'react'; -export class Subscriptions extends React.Component { +export class StarterKit extends React.Component { constructor() { super(); // a good place to initialize this.state diff --git a/src/subscriptions.css b/src/subscriptions.css deleted file mode 100644 index 375e234..0000000 --- a/src/subscriptions.css +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This file is part of Cockpit. - * - * Copyright (C) 2017 Red Hat, Inc. - * - * Cockpit is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * Cockpit is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Cockpit; If not, see . - */ - diff --git a/subscription-manager-cockpit.spec b/starter-cockpit.spec similarity index 54% rename from subscription-manager-cockpit.spec rename to starter-cockpit.spec index f45373d..d3bd4d8 100644 --- a/subscription-manager-cockpit.spec +++ b/starter-cockpit.spec @@ -1,21 +1,19 @@ -Name: subscription-manager-cockpit +Name: starter-cockpit Version: 1 Release: 0 -Summary: Subscription Manager Cockpit UI +Summary: Cockpit Starter Kit Example Module License: LGPLv2.1+ -Source: subscription-manager-cockpit.tar.gz +Source: starter-cockpit.tar.gz BuildArch: noarch -Requires: subscription-manager - %define debug_package %{nil} %description -Subscription Manager Cockpit UI +Cockpit Starter Kit Example Module %prep -%setup -n subscription-manager-cockpit +%setup -n starter-cockpit %build diff --git a/webpack.config.js b/webpack.config.js index 1cca8e7..a0c0372 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -21,8 +21,7 @@ var production = process.env.NODE_ENV === 'production'; var info = { entries: { "index": [ - "./index.js", - "./subscriptions.css", + "./index.js" ] }, files: [